Skip to content

Commit 50e2361

Browse files
naotakdave
authored andcommitted
btrfs: zoned: do not select metadata BG as finish target
We call btrfs_zone_finish_one_bg() to zone finish one block group and make room to activate another block group. Currently, we can choose a metadata block group as a target. But, as we reserve an active metadata block group, we no longer want to select a metadata block group. So, skip it in the loop. Signed-off-by: Naohiro Aota <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]>
1 parent d4d3f2b commit 50e2361

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/zoned.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2671,7 +2671,7 @@ int btrfs_zone_finish_one_bg(struct btrfs_fs_info *fs_info)
26712671

26722672
spin_lock(&block_group->lock);
26732673
if (block_group->reserved || block_group->alloc_offset == 0 ||
2674-
(block_group->flags & BTRFS_BLOCK_GROUP_SYSTEM) ||
2674+
!(block_group->flags & BTRFS_BLOCK_GROUP_DATA) ||
26752675
test_bit(BLOCK_GROUP_FLAG_ZONED_DATA_RELOC, &block_group->runtime_flags)) {
26762676
spin_unlock(&block_group->lock);
26772677
continue;

0 commit comments

Comments
 (0)