]> granicus.if.org Git - zfs/commitdiff
4188 assertion failed in dmu_tx_hold_free(): dn_datablkshift != 0
authorMatthew Ahrens <mahrens@delphix.com>
Fri, 31 Jan 2014 15:52:11 +0000 (02:52 +1100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 31 Jan 2014 18:49:34 +0000 (10:49 -0800)
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>

Refences:
  https://www.illumos.org/issues/4188
  illumos/illumos-gate@bb411a08b05466bfe0c7095b6373bbc1587e259a

Ported-by: Chris Dunlop <chris@onthe.net.au>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2091

module/zfs/dmu_tx.c

index 47cb86b0894be92d247ac3b1db3efac7ddad28b0..3e04793cf3fb3dbe6dddb0e9513e6e2f695eb0eb 100644 (file)
@@ -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++) {