diff options
author | Alexander Motin <[email protected]> | 2024-01-09 12:46:43 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2024-01-12 12:53:00 -0800 |
commit | 152a775eac59e026100835cb213ccafa3a163ad6 (patch) | |
tree | 5cd6e211b2e332afa1bfea1c6d5755aaf2594aa4 /.github | |
parent | 976bf9b6a61919638d42ed79cd207132785d128a (diff) |
Improve block sizes checks during cloning
- Fail if source block is smaller than destination. We can only
grow blocks, not shrink them.
- Fail if we do not have full znode range lock. In that case grow
is not even called. We should improve zfs_rangelock_cb() somehow
to know when cloning needs to grow the block size unlike write.
- Fail of we tried to resize, but failed. There are many reasons
for it to fail that we can not predict at this level, so be ready
for them. Unlike write, that may proceed after growth failure,
block cloning can't and must return error.
This fixes assertion inside dmu_brt_clone() when it sees different
number of blocks held in destination than it got block pointers.
Builds without ZFS_DEBUG returned EXDEV, so are not affected much.
Reviewed-by: Pawel Jakub Dawidek <[email protected]>
Reviewed-by: Brian Atkinson <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Sponsored by: iXsystems, Inc.
Closes #15724
Closes #15735
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions