svn commit: r249921 - in head: . sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys
Alfred Perlstein
bright at mu.org
Fri Apr 26 22:02:28 UTC 2013
On 4/26/13 2:48 PM, Steven Hartland wrote:
> The entire ZFS TRIM work is only is on in current ATM so I assume this
> wont actually be an issue?
Yes, that makes sense. I misunderstood that the change was a rename
that was going to make it into -stable.
thanks,
-Alfred
>
> Regards
> Steve
> ----- Original Message ----- From: "Alfred Perlstein" <bright at mu.org>
> To: "Steven Hartland" <smh at FreeBSD.org>
> Cc: <src-committers at freebsd.org>; <svn-src-all at freebsd.org>;
> <svn-src-head at freebsd.org>
> Sent: Friday, April 26, 2013 8:54 PM
> Subject: Re: svn commit: r249921 - in head: .
> sys/cddl/contrib/opensolaris/uts/common/fs/zfs
> sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys
>
>
>>
>> This can not be MFC'd, it breaks API.
>>
>> Using a sysctl proc (or analogous method) to preserve the old sysctl
>> mib would suffice.
>>
>> -Alfred
>>
>> On 4/26/13 4:24 AM, Steven Hartland wrote:
>>> Author: smh
>>> Date: Fri Apr 26 11:24:20 2013
>>> New Revision: 249921
>>> URL: http://svnweb.freebsd.org/changeset/base/249921
>>>
>>> Log:
>>> Changed ZFS TRIM sysctl from vfs.zfs.trim_disable ->
>>> vfs.zfs.trim.enabled
>>> Enabled ZFS TRIM by default
>>> Reviewed by: pjd (mentor)
>>> Approved by: pjd (mentor)
>>> MFC after: 2 weeks
>>>
>>> Modified:
>>> head/UPDATING
>>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h
>>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c
>>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c
>>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
>>>
>>> Modified: head/UPDATING
>>> ==============================================================================
>>>
>>> --- head/UPDATING Fri Apr 26 07:00:49 2013 (r249920)
>>> +++ head/UPDATING Fri Apr 26 11:24:20 2013 (r249921)
>>> @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10
>>> disable the most expensive debugging functionality run
>>> "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
>>> +20130426:
>>> + The sysctl which controls TRIM support under ZFS has been renamed
>>> + from vfs.zfs.trim_disable -> vfs.zfs.trim.enabled and has been
>>> + enabled by default.
>>> +
>>> 20130425:
>>> The mergemaster command now uses the default MAKEOBJDIRPREFIX
>>> rather than creating it's own in the temporary directory in
>>>
>>> Modified:
>>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h
>>> ==============================================================================
>>>
>>> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h
>>> Fri Apr 26 07:00:49 2013 (r249920)
>>> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h
>>> Fri Apr 26 11:24:20 2013 (r249921)
>>> @@ -46,7 +46,7 @@ typedef enum vdev_dtl_type {
>>> } vdev_dtl_type_t;
>>> extern boolean_t zfs_nocacheflush;
>>> -extern boolean_t zfs_notrim;
>>> +extern boolean_t zfs_trim_enabled;
>>> extern int vdev_open(vdev_t *);
>>> extern void vdev_open_children(vdev_t *);
>>>
>>> Modified:
>>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c
>>> ==============================================================================
>>>
>>> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c
>>> Fri Apr 26 07:00:49 2013 (r249920)
>>> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c
>>> Fri Apr 26 11:24:20 2013 (r249921)
>>> @@ -72,7 +72,7 @@ typedef struct trim_seg {
>>> hrtime_t ts_time; /* Segment creation time. */
>>> } trim_seg_t;
>>> -extern boolean_t zfs_notrim;
>>> +extern boolean_t zfs_trim_enabled;
>>> static u_int trim_txg_delay = 32;
>>> static u_int trim_timeout = 30;
>>> @@ -157,7 +157,7 @@ trim_map_create(vdev_t *vd)
>>> ASSERT(vd->vdev_ops->vdev_op_leaf);
>>> - if (zfs_notrim)
>>> + if (!zfs_trim_enabled)
>>> return;
>>> tm = kmem_zalloc(sizeof (*tm), KM_SLEEP);
>>> @@ -183,7 +183,7 @@ trim_map_destroy(vdev_t *vd)
>>> ASSERT(vd->vdev_ops->vdev_op_leaf);
>>> - if (zfs_notrim)
>>> + if (!zfs_trim_enabled)
>>> return;
>>> tm = vd->vdev_trimmap;
>>> @@ -340,7 +340,7 @@ trim_map_free(vdev_t *vd, uint64_t offse
>>> {
>>> trim_map_t *tm = vd->vdev_trimmap;
>>> - if (zfs_notrim || vd->vdev_notrim || tm == NULL)
>>> + if (!zfs_trim_enabled || vd->vdev_notrim || tm == NULL)
>>> return;
>>> mutex_enter(&tm->tm_lock);
>>> @@ -357,7 +357,7 @@ trim_map_write_start(zio_t *zio)
>>> boolean_t left_over, right_over;
>>> uint64_t start, end;
>>> - if (zfs_notrim || vd->vdev_notrim || tm == NULL)
>>> + if (!zfs_trim_enabled || vd->vdev_notrim || tm == NULL)
>>> return (B_TRUE);
>>> start = zio->io_offset;
>>> @@ -404,7 +404,7 @@ trim_map_write_done(zio_t *zio)
>>> * Don't check for vdev_notrim, since the write could have
>>> * started before vdev_notrim was set.
>>> */
>>> - if (zfs_notrim || tm == NULL)
>>> + if (!zfs_trim_enabled || tm == NULL)
>>> return;
>>> mutex_enter(&tm->tm_lock);
>>> @@ -589,7 +589,7 @@ void
>>> trim_thread_create(spa_t *spa)
>>> {
>>> - if (zfs_notrim)
>>> + if (!zfs_trim_enabled)
>>> return;
>>> mutex_init(&spa->spa_trim_lock, NULL, MUTEX_DEFAULT, NULL);
>>> @@ -604,7 +604,7 @@ void
>>> trim_thread_destroy(spa_t *spa)
>>> {
>>> - if (zfs_notrim)
>>> + if (!zfs_trim_enabled)
>>> return;
>>> if (spa->spa_trim_thread == NULL)
>>> return;
>>> @@ -627,7 +627,7 @@ void
>>> trim_thread_wakeup(spa_t *spa)
>>> {
>>> - if (zfs_notrim)
>>> + if (!zfs_trim_enabled)
>>> return;
>>> if (spa->spa_trim_thread == NULL)
>>> return;
>>>
>>> Modified:
>>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c
>>> ==============================================================================
>>>
>>> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c
>>> Fri Apr 26 07:00:49 2013 (r249920)
>>> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c
>>> Fri Apr 26 11:24:20 2013 (r249921)
>>> @@ -729,7 +729,7 @@ vdev_label_init(vdev_t *vd, uint64_t crt
>>> * Don't TRIM if removing so that we don't interfere with zpool
>>> * disaster recovery.
>>> */
>>> - if (!zfs_notrim && vdev_trim_on_init && (reason ==
>>> VDEV_LABEL_CREATE ||
>>> + if (zfs_trim_enabled && vdev_trim_on_init && (reason ==
>>> VDEV_LABEL_CREATE ||
>>> reason == VDEV_LABEL_SPARE || reason == VDEV_LABEL_L2CACHE))
>>> zio_wait(zio_trim(NULL, spa, vd, 0, vd->vdev_psize));
>>>
>>> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
>>> ==============================================================================
>>>
>>> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Fri
>>> Apr 26 07:00:49 2013 (r249920)
>>> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Fri
>>> Apr 26 11:24:20 2013 (r249921)
>>> @@ -83,10 +83,11 @@ boolean_t zfs_nocacheflush = B_FALSE;
>>> TUNABLE_INT("vfs.zfs.cache_flush_disable", &zfs_nocacheflush);
>>> SYSCTL_INT(_vfs_zfs, OID_AUTO, cache_flush_disable, CTLFLAG_RDTUN,
>>> &zfs_nocacheflush, 0, "Disable cache flush");
>>> -boolean_t zfs_notrim = B_TRUE;
>>> -TUNABLE_INT("vfs.zfs.trim_disable", &zfs_notrim);
>>> -SYSCTL_INT(_vfs_zfs, OID_AUTO, trim_disable, CTLFLAG_RDTUN,
>>> &zfs_notrim, 0,
>>> - "Disable trim");
>>> +boolean_t zfs_trim_enabled = B_TRUE;
>>> +SYSCTL_DECL(_vfs_zfs_trim);
>>> +TUNABLE_INT("vfs.zfs.trim.enabled", &zfs_trim_enabled);
>>> +SYSCTL_INT(_vfs_zfs_trim, OID_AUTO, enabled, CTLFLAG_RDTUN,
>>> &zfs_trim_enabled, 0,
>>> + "Enable ZFS TRIM");
>>> static kmem_cache_t *zil_lwb_cache;
>>>
>>
>>
>
>
> ================================================
> This e.mail is private and confidential between Multiplay (UK) Ltd.
> and the person or entity to whom it is addressed. In the event of
> misdirection, the recipient is prohibited from using, copying,
> printing or otherwise disseminating it or any information contained in
> it.
> In the event of misdirection, illegible or incomplete transmission
> please telephone +44 845 868 1337
> or return the E.mail to postmaster at multiplay.co.uk.
>
More information about the svn-src-head
mailing list