mbox series

[0/3] Fix active zone accounting for zoned

Message ID cover.1677705092.git.josef@toxicpanda.com (mailing list archive)
Headers show
Series Fix active zone accounting for zoned | expand

Message

Josef Bacik March 1, 2023, 9:14 p.m. UTC
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(-)