Skip to content

Commit 5b135b3

Browse files
naotakdave
authored andcommitted
btrfs: zoned: re-enable metadata over-commit for zoned mode
Now that, we can re-enable metadata over-commit. As we moved the activation from the reservation time to the write time, we no longer need to ensure all the reserved bytes is properly activated. Without the metadata over-commit, it suffers from lower performance because it needs to flush the delalloc items more often and allocate more block groups. Re-enabling metadata over-commit will solve the issue. Fixes: 79417d0 ("btrfs: zoned: disable metadata overcommit for zoned") CC: stable@vger.kernel.org # 6.1+ Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 5a7d107 commit 5b135b3

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

fs/btrfs/space-info.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,7 @@ int btrfs_can_overcommit(struct btrfs_fs_info *fs_info,
389389
return 0;
390390

391391
used = btrfs_space_info_used(space_info, true);
392-
if (test_bit(BTRFS_FS_ACTIVE_ZONE_TRACKING, &fs_info->flags) &&
393-
(space_info->flags & BTRFS_BLOCK_GROUP_METADATA))
394-
avail = 0;
395-
else
396-
avail = calc_available_free_space(fs_info, space_info, flush);
392+
avail = calc_available_free_space(fs_info, space_info, flush);
397393

398394
if (used + bytes < space_info->total_bytes + avail)
399395
return 1;

0 commit comments

Comments
 (0)