svn commit: r244188 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Pawel Jakub Dawidek pjd at FreeBSD.org
Fri Dec 14 22:04:10 UTC 2012


On Thu, Dec 13, 2012 at 05:39:08PM +0000, Steven Hartland wrote:
> Author: smh
> Date: Thu Dec 13 17:39:07 2012
> New Revision: 244188
> URL: http://svnweb.freebsd.org/changeset/base/244188
> 
> Log:
>   Added vfs.zfs.vdev.trim_on_init sysctl which allows full vdev trim on
>   initialisation to be enabled (1) / disabled (0) defaults to enabled.
>   
>   This is useful for devices which have a slow trim speed and are either
>   new or have otherwise already been wiped e.g. secure erase.
>   
>   PR:     kern/173116
>   Submitted by:   Steven Hartland
>   Approved by:    pjd (mentor)
> 
> Modified:
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c
> 
> 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	Thu Dec 13 17:06:38 2012	(r244187)
> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c	Thu Dec 13 17:39:07 2012	(r244188)
> @@ -148,6 +148,11 @@
>  #include <sys/trim_map.h>
>  #include <sys/fs/zfs.h>
>  
> +static boolean_t vdev_trim_on_init = B_TRUE;
> +SYSCTL_DECL(_vfs_zfs_vdev);
> +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, trim_on_init, CTLFLAG_RW,
> +    &vdev_trim_on_init, 0, "Enable/disable full vdev trim on initialisation");

I'd also make it loader tunable.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://tupytaj.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20121214/d55ed495/attachment.sig>


More information about the svn-src-all mailing list