Skip to content

Commit 3a931e9

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. CC: [email protected] # 6.6+ Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Naohiro Aota <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 4289b49 commit 3a931e9

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
@@ -2650,7 +2650,7 @@ int btrfs_zone_finish_one_bg(struct btrfs_fs_info *fs_info)
26502650

26512651
spin_lock(&block_group->lock);
26522652
if (block_group->reserved || block_group->alloc_offset == 0 ||
2653-
(block_group->flags & BTRFS_BLOCK_GROUP_SYSTEM) ||
2653+
!(block_group->flags & BTRFS_BLOCK_GROUP_DATA) ||
26542654
test_bit(BLOCK_GROUP_FLAG_ZONED_DATA_RELOC, &block_group->runtime_flags)) {
26552655
spin_unlock(&block_group->lock);
26562656
continue;

0 commit comments

Comments
 (0)