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

Andriy Gapon avg at FreeBSD.org
Thu Sep 29 12:50:18 UTC 2016


On 29/09/2016 03:00, Alexander Motin wrote:
> Author: mav
> Date: Thu Sep 29 00:00:37 2016
> New Revision: 306425
> URL: https://svnweb.freebsd.org/changeset/base/306425
> 
> Log:
>   MFV r306423: 7402 Create tunable to ignore hole_birth feature
>   
>   Until we can resolve the numerous hole_birth bugs that have cropped up
>   recently, and come up with a way going forwards to protect users from
>   corruption, we should disable the hole_birth feature.  Using a tunable
>   allows those who are confident that their data is correct to continue to
>   take advantage of the feature.
>   
>   Closes #188
>   
>   Reviewed by: Matthew Ahrens <mahrens at delphix.com>
>   Author: Paul Dagnelie <pcd at delphix.com>
> 
> Modified:
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c
> Directory Properties:
>   head/sys/cddl/contrib/opensolaris/   (props changed)
> 
> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c
> ==============================================================================
> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c	Wed Sep 28 23:54:47 2016	(r306424)
> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c	Thu Sep 29 00:00:37 2016	(r306425)
> @@ -40,6 +40,11 @@
>  #include <sys/zfeature.h>
>  
>  int32_t zfs_pd_bytes_max = 50 * 1024 * 1024;	/* 50MB */
> +boolean_t send_holes_without_birth_time = B_TRUE;
> +
> +SYSCTL_DECL(_vfs_zfs);
> +SYSCTL_UINT(_vfs_zfs, OID_AUTO, send_holes_without_birth_time, CTLFLAG_RWTUN,
> +    &send_holes_without_birth_time, 0, "Send holes without birth time");


I think that this should be guarded with _KERNEL.

>  typedef struct prefetch_data {
>  	kmutex_t pd_mtx;
> @@ -254,7 +259,8 @@ traverse_visitbp(traverse_data_t *td, co
>  		 *
>  		 * Note that the meta-dnode cannot be reallocated.
>  		 */
> -		if ((!td->td_realloc_possible ||
> +		if (!send_holes_without_birth_time &&
> +		    (!td->td_realloc_possible ||
>  		    zb->zb_object == DMU_META_DNODE_OBJECT) &&
>  		    td->td_hole_birth_enabled_txg <= td->td_min_txg)
>  			return (0);
> 


-- 
Andriy Gapon


More information about the svn-src-head mailing list