Author: mav
Date: Sat Oct 29 08:55:13 2016
New Revision: 308084
URL: https://svnweb.freebsd.org/changeset/base/308084

Log:
  MFC r306425: 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 <mahr...@delphix.com>
  Author: Paul Dagnelie <p...@delphix.com>

Modified:
  stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c
Directory Properties:
  stable/11/   (props changed)

Modified: 
stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c
==============================================================================
--- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c     
Sat Oct 29 08:54:18 2016        (r308083)
+++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c     
Sat Oct 29 08:55:13 2016        (r308084)
@@ -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");
 
 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);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to