Print this page
4188 assertion failed in dmu_tx_hold_free(): dn_datablkshift != 0
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/dmu_tx.c
          +++ new/usr/src/uts/common/fs/zfs/dmu_tx.c
↓ open down ↓ 627 lines elided ↑ open up ↑
 628  628  
 629  629          /*
 630  630           * Check level-1 blocks.
 631  631           */
 632  632          if (dn->dn_nlevels > 1) {
 633  633                  int shift = dn->dn_datablkshift + dn->dn_indblkshift -
 634  634                      SPA_BLKPTRSHIFT;
 635  635                  uint64_t start = off >> shift;
 636  636                  uint64_t end = (off + len) >> shift;
 637  637  
 638      -                ASSERT(dn->dn_datablkshift != 0);
 639  638                  ASSERT(dn->dn_indblkshift != 0);
 640  639  
      640 +                /*
      641 +                 * dnode_reallocate() can result in an object with indirect
      642 +                 * blocks having an odd data block size.  In this case,
      643 +                 * just check the single block.
      644 +                 */
      645 +                if (dn->dn_datablkshift == 0)
      646 +                        start = end = 0;
      647 +
 641  648                  zio = zio_root(tx->tx_pool->dp_spa,
 642  649                      NULL, NULL, ZIO_FLAG_CANFAIL);
 643  650                  for (uint64_t i = start; i <= end; i++) {
 644  651                          uint64_t ibyte = i << shift;
 645  652                          err = dnode_next_offset(dn, 0, &ibyte, 2, 1, 0);
 646  653                          i = ibyte >> shift;
 647  654                          if (err == ESRCH)
 648  655                                  break;
 649  656                          if (err) {
 650  657                                  tx->tx_err = err;
↓ open down ↓ 958 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX