Skip to content

Commit 1f1c5c4

Browse files
amotinixhamza
authored andcommitted
Fix false assertion in dmu_tx_dirty_buf() on cloning
Same as writes block cloning can increase block size and number of indirection levels. That means it can dirty block 0 at level 0 or at new top indirection level without explicitly holding them. Signed-off-by: Alexander Motin <[email protected]> Sponsored by: iXsystems, Inc.
1 parent b1d18d3 commit 1f1c5c4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

module/zfs/dmu_tx.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,14 @@ dmu_tx_dirty_buf(dmu_tx_t *tx, dmu_buf_impl_t *db)
800800
case THT_CLONE:
801801
if (blkid >= beginblk && blkid <= endblk)
802802
match_offset = TRUE;
803+
/*
804+
* They might have to increase nlevels,
805+
* thus dirtying the new TLIBs. Or the
806+
* might have to change the block size,
807+
* thus dirying the new lvl=0 blk=0.
808+
*/
809+
if (blkid == 0)
810+
match_offset = TRUE;
803811
break;
804812
default:
805813
cmn_err(CE_PANIC, "bad txh_type %d",

0 commit comments

Comments
 (0)