diff options
author | Rich Ercolani <[email protected]> | 2016-07-08 16:51:50 -0400 |
---|---|---|
committer | Ned Bass <[email protected]> | 2016-09-09 13:20:54 -0700 |
commit | 3a8e13688b4ee8c1799edb6484943eae5ea90dd2 (patch) | |
tree | e6534dc1bcfc030d12c265a868169ac26489639a /module/zfs/dmu_traverse.c | |
parent | 4f96e68fadfb00bf4f91d0c8c0e9d7d29393c9e0 (diff) |
Add tunable to ignore hole_birth (enabled by default)
Adds a module option which disables the hole_birth optimization
which has been responsible for several recent bugs, including
issue #4050.
Original-patch: https://gist.github.com/pcd1193182/2c0cd47211f3aee623958b4698836c48
Signed-off-by: Rich Ercolani <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #4833
Diffstat (limited to 'module/zfs/dmu_traverse.c')
-rw-r--r-- | module/zfs/dmu_traverse.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/module/zfs/dmu_traverse.c b/module/zfs/dmu_traverse.c index cdb29b622..a58f77f08 100644 --- a/module/zfs/dmu_traverse.c +++ b/module/zfs/dmu_traverse.c @@ -39,6 +39,7 @@ #include <sys/zfeature.h> int32_t zfs_pd_bytes_max = 50 * 1024 * 1024; /* 50MB */ +int32_t ignore_hole_birth = 1; typedef struct prefetch_data { kmutex_t pd_mtx; @@ -250,7 +251,7 @@ 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 (!ignore_hole_birth && (!td->td_realloc_possible || zb->zb_object == DMU_META_DNODE_OBJECT) && td->td_hole_birth_enabled_txg <= td->td_min_txg) return (0); @@ -692,4 +693,7 @@ EXPORT_SYMBOL(traverse_pool); module_param(zfs_pd_bytes_max, int, 0644); MODULE_PARM_DESC(zfs_pd_bytes_max, "Max number of bytes to prefetch"); + +module_param(ignore_hole_birth, int, 0644); +MODULE_PARM_DESC(ignore_hole_birth, "Ignore hole_birth txg for send"); #endif |