Skip to content

Fix active zone accounting for zoned

Josef Bacik linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3btrfs: rename BTRFS_FS_NO_OVERCOMMIT -> BTRFS_FS_ACTIVE_ZONE_TRACKINGfs/btrfs/fs.h fs/btrfs/space-info.c fs/btrfs/zoned.c+4 -83 replies
2/3btrfs: clean up space_info usage in btrfs_update_block_groupfs/btrfs/block-group.c+12 -103 replies
3/3btrfs: handle active zone accounting properlyfs/btrfs/block-group.c fs/btrfs/disk-io.c fs/btrfs/extent-tree.c +3 more+152 -133 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchAnand JainJohannes ThumshirnNaohiro Aota
1/3R-b R-b R-b
2/3R-b R-b R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/3] Fix active zone accounting for zoned

Hello,

While trying to get the CI system up and running with the ZNS drives I ran into this issue where the TEST_DEV would get maxed out on block groups and everything would start failing with -ENOSPC.

This is because the way we handle active zone tracking isn't correct. We need to only take into account the used/pinned/zone_unusable counters for the active block groups, not the system wide counters.

Unfortunately this is kind of annoying in that we have to mirror these counters for the active block groups. At this point this is the most straightforward way to fix this. I'm currently running these patches through xfstests, so consider this as sort of an RFC to make sure the approach seems reasonable. Thanks,

Josef

Josef Bacik (3):
btrfs: rename BTRFS_FS_NO_OVERCOMMIT -> BTRFS_FS_ACTIVE_ZONE_TRACKING
btrfs: clean up space_info usage in btrfs_update_block_group
btrfs: handle active zone accounting properly

 fs/btrfs/block-group.c | 51 ++++++++++++++++++-------
 fs/btrfs/disk-io.c     |  6 +++
 fs/btrfs/extent-tree.c | 13 +++++++
 fs/btrfs/fs.h          |  7 +---
 fs/btrfs/space-info.c  | 85 +++++++++++++++++++++++++++++++++++++++---
 fs/btrfs/space-info.h  | 20 +++++++++-
 fs/btrfs/zoned.c       | 17 ++++++---
 7 files changed, 168 insertions(+), 31 deletions(-)
Signature · 1 line
2.26.3