Skip to content

Instantly share code, notes, and snippets.

@rincebrain
Created July 8, 2016 20:32
Show Gist options
  • Save rincebrain/58d61d051c48a84430fb8830b8d754bf to your computer and use it in GitHub Desktop.
Save rincebrain/58d61d051c48a84430fb8830b8d754bf to your computer and use it in GitHub Desktop.
--- 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 = 0;
typedef struct prefetch_data {
kmutex_t pd_mtx;
@@ -251,7 +252,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);
@@ -727,4 +728,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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment