Fix false assertion in dmu_tx_dirty_buf() on cloning
commite8b333e4d33b7c6f3f1e3761b0e1ac3210275dc8
authorAlexander Motin <mav@FreeBSD.org>
Thu, 5 Dec 2024 19:48:08 +0000 (5 14:48 -0500)
committerGitHub <noreply@github.com>
Thu, 5 Dec 2024 19:48:08 +0000 (5 11:48 -0800)
treed47c559a5e67a60c297217cc91b0ee075b1fc456
parent44446dccdb0077bcf9d93db2fe336ccefc04635e
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
module/zfs/dmu_tx.c
tests/runfiles/common.run
tests/test-runner/bin/zts-report.py.in
tests/zfs-tests/tests/Makefile.am
tests/zfs-tests/tests/functional/block_cloning/block_cloning_large_offset.ksh [new file with mode: 0755]