diff options
author | mav <mav@FreeBSD.org> | 2016-10-29 08:56:43 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-10-29 08:56:43 +0000 |
commit | 4a2d37ab7e7fdaba023beb5e94a7a090c7d17fa3 (patch) | |
tree | 94db6b7f8f5c4056a63dbc53752655ea6846de64 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c | |
parent | a3d808949d4d66f227b6551e5714b3c6040b0af9 (diff) | |
download | FreeBSD-src-4a2d37ab7e7fdaba023beb5e94a7a090c7d17fa3.zip FreeBSD-src-4a2d37ab7e7fdaba023beb5e94a7a090c7d17fa3.tar.gz |
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 <mahrens@delphix.com>
Author: Paul Dagnelie <pcd@delphix.com>
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c index a76e74b8..a137214 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c @@ -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, const dnode_phys_t *dnp, * * 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); |