Skip to content

Instantly share code, notes, and snippets.

@tuxoko
Created August 26, 2016 00:46
Show Gist options
  • Save tuxoko/b076905d8f67e3d9d60e782a8ec7bf9a to your computer and use it in GitHub Desktop.
Save tuxoko/b076905d8f67e3d9d60e782a8ec7bf9a to your computer and use it in GitHub Desktop.
diff --git a/module/zfs/dmu_objset.c b/module/zfs/dmu_objset.c
index 22ca84d..d372ea2 100644
--- a/module/zfs/dmu_objset.c
+++ b/module/zfs/dmu_objset.c
@@ -854,6 +854,9 @@ dmu_objset_create_impl(spa_t *spa, dsl_dataset_t *ds, blkptr_t *bp,
DN_MAX_OBJECT * sizeof (dnode_phys_t))
levels++;
+ if (type == DMU_OST_ZVOL)
+ levels = 2;
+
mdn->dn_next_nlevels[tx->tx_txg & TXG_MASK] =
mdn->dn_nlevels = levels;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment