diff options
| author | Johannes Thumshirn <johannes.thumshirn@wdc.com> | 2026-08-19 12:26:36 +0200 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-09-02 22:19:29 +0200 |
| commit | a18a6b93a2843b9d103d3456bbd4b3f90282a379 (patch) | |
| tree | 053cfb938433ed989e439f4983119d8b124857d1 /scripts/Makefile.thinlto | |
| parent | 0853dc4f2678bbb21ff3d7572b0e9b812985bd65 (diff) | |
btrfs: zoned: finish active block group cleanup if call_zone_finish() fails
do_zone_finish() clears BLOCK_GROUP_FLAG_ZONE_IS_ACTIVE before finishing
the zones. If call_zone_finish() then fails it returned early, leaving the
now inactive block group on fs_info->zone_active_bgs, leaking its
reference, the BTRFS_FS_NEED_ZONE_FINISH waiters are never woken, and as
its alloc_offset equals the zone capacity btrfs_zone_finish_one_bg() keeps
selecting it, spinning btrfs_zoned_activate_one_bg().
Fall through to the cleanup on failure too and return the error, but keep
the block group read-only as its zones are left inconsistent.
Fixes: d70cbdda75da ("btrfs: zoned: consolidate zone finish functions")
Link: https://sashiko.dev/#/patchset/20260818100037.1366563-1-johannes.thumshirn%40wdc.com
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
