diff options
| author | Johannes Thumshirn <[email protected]> | 2025-09-05 13:54:43 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2025-09-15 03:25:37 +0000 |
| commit | 5b8d2964754102323ca24495ba94892426284e3a (patch) | |
| tree | 7851ba60f4fc320a564567f87f39aec03c92f81a /fs/btrfs/inode.c | |
| parent | btrfs: fix invalid extref key setup when replaying dentry (diff) | |
| download | kernel-5b8d2964754102323ca24495ba94892426284e3a.tar.gz kernel-5b8d2964754102323ca24495ba94892426284e3a.zip | |
btrfs: zoned: fix incorrect ASSERT in btrfs_zoned_reserve_data_reloc_bg()
When moving a block-group to the dedicated data relocation space-info in
btrfs_zoned_reserve_data_reloc_bg() it is asserted that the newly
created block group for data relocation does not contain any
zone_unusable bytes.
But on disks with zone_capacity < zone_size, the difference between
zone_size and zone_capacity is accounted as zone_unusable.
Instead of asserting that the block-group does not contain any
zone_unusable bytes, remove them from the block-groups total size.
Reported-by: Yi Zhang <[email protected]>
Link: https://lore.kernel.org/linux-block/CAHj4cs8-cS2E+-xQ-d2Bj6vMJZ+CwT_cbdWBTju4BV35LsvEYw@mail.gmail.com/
Fixes: daa0fde322350 ("btrfs: zoned: fix data relocation block group reservation")
Reviewed-by: Naohiro Aota <[email protected]>
Tested-by: Yi Zhang <[email protected]>
Signed-off-by: Johannes Thumshirn <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/inode.c')
0 files changed, 0 insertions, 0 deletions
