summaryrefslogtreecommitdiffstats
path: root/module/zfs/dmu_tx.c
diff options
context:
space:
mode:
authorMatthew Ahrens <[email protected]>2014-02-01 02:52:11 +1100
committerBrian Behlendorf <[email protected]>2014-01-31 10:49:34 -0800
commit2e7b7657cdb9ad02c0e0fcf6c8b2bb1c58d1273a (patch)
tree2ae749ec29216e46cc6bd3b37279ab7a424e9033 /module/zfs/dmu_tx.c
parent8b4646494c23fc17c7cc5f7a857e27c463540098 (diff)
4188 assertion failed in dmu_tx_hold_free(): dn_datablkshift != 0
Reviewed by: George Wilson <[email protected]> Reviewed by: Christopher Siden <[email protected]> Approved by: Garrett D'Amore <[email protected]> Refences: https://www.illumos.org/issues/4188 illumos/illumos-gate@bb411a08b05466bfe0c7095b6373bbc1587e259a Ported-by: Chris Dunlop <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #2091
Diffstat (limited to 'module/zfs/dmu_tx.c')
-rw-r--r--module/zfs/dmu_tx.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/module/zfs/dmu_tx.c b/module/zfs/dmu_tx.c
index 47cb86b08..3e04793cf 100644
--- a/module/zfs/dmu_tx.c
+++ b/module/zfs/dmu_tx.c
@@ -656,9 +656,16 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t object, uint64_t off, uint64_t len)
uint64_t end = (off + len) >> shift;
uint64_t i;
- ASSERT(dn->dn_datablkshift != 0);
ASSERT(dn->dn_indblkshift != 0);
+ /*
+ * dnode_reallocate() can result in an object with indirect
+ * blocks having an odd data block size. In this case,
+ * just check the single block.
+ */
+ if (dn->dn_datablkshift == 0)
+ start = end = 0;
+
zio = zio_root(tx->tx_pool->dp_spa,
NULL, NULL, ZIO_FLAG_CANFAIL);
for (i = start; i <= end; i++) {