mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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. A block cloning test case for large offsets has been added. Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Co-authored-by: Ameer Hamza <ahamza@ixsystems.com> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #16825
This commit is contained in:
@@ -800,6 +800,14 @@ dmu_tx_dirty_buf(dmu_tx_t *tx, dmu_buf_impl_t *db)
|
||||
case THT_CLONE:
|
||||
if (blkid >= beginblk && blkid <= endblk)
|
||||
match_offset = TRUE;
|
||||
/*
|
||||
* They might have to increase nlevels,
|
||||
* thus dirtying the new TLIBs. Or the
|
||||
* might have to change the block size,
|
||||
* thus dirying the new lvl=0 blk=0.
|
||||
*/
|
||||
if (blkid == 0)
|
||||
match_offset = TRUE;
|
||||
break;
|
||||
default:
|
||||
cmn_err(CE_PANIC, "bad txh_type %d",
|
||||
|
||||
Reference in New Issue
Block a user