From owner-svn-src-head@FreeBSD.ORG Fri Apr 26 21:48:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BD09F366; Fri, 26 Apr 2013 21:48:19 +0000 (UTC) (envelope-from prvs=1828e49ea6=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 05A9A1013; Fri, 26 Apr 2013 21:48:18 +0000 (UTC) Received: from r2d2 ([46.65.172.4]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50003502721.msg; Fri, 26 Apr 2013 22:48:09 +0100 X-Spam-Processed: mail1.multiplay.co.uk, Fri, 26 Apr 2013 22:48:09 +0100 (not processed: message from valid local sender) X-MDDKIM-Result: neutral (mail1.multiplay.co.uk) X-MDRemoteIP: 46.65.172.4 X-Return-Path: prvs=1828e49ea6=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk Message-ID: <00968EEBD1CA46928DCBDEB106664F22@multiplay.co.uk> From: "Steven Hartland" To: "Alfred Perlstein" References: <201304261124.r3QBOKIO042913@svn.freebsd.org> <517ADB77.9040203@mu.org> Subject: Re: svn commit: r249921 - in head: . sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys Date: Fri, 26 Apr 2013 22:48:38 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Apr 2013 21:48:19 -0000 The entire ZFS TRIM work is only is on in current ATM so I assume this wont actually be an issue? Regards Steve ----- Original Message ----- From: "Alfred Perlstein" To: "Steven Hartland" Cc: ; ; 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@multiplay.co.uk.