RFC btrfs: zoned: replace active_total_bytes system
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | btrfs: zoned: count fresh BG region as zone unusablefs/ fs/ | +25 | 0 replies | |
| 2/2 | btrfs: zoned: drop space_info->active_total_bytesfs/ fs/ fs/ +1 more | +9 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/2] btrfs: zoned: replace active_total_bytes system
This series is still not well tested. Please don't merge right now.
The space_info->active_total_bytes is misleading. It counts not only active block groups but also previously active but now inactive (full BGs, due to fully written) ones. That results in a bug not counting the full BGs into active_total_bytes.
Instead, we can count a newly allocated block group's region as zone_unusable. Then, once that block group is activated, subtract [0 .. zone_capcity] from the zone_unusable counters. With this, the regualr space_info's accounting code will align naturally for zone activation support.
Naohiro Aota (2):
btrfs: zoned: count fresh BG region as zone unusable
btrfs: zoned: drop space_info->active_total_bytes
fs/btrfs/block-group.c | 6 ------ fs/btrfs/free-space-cache.c | 8 +++++++- fs/btrfs/space-info.c | 40 +++++++++---------------------------- fs/btrfs/space-info.h | 2 -- fs/btrfs/zoned.c | 26 ++++++++++++++++-------- 5 files changed, 34 insertions(+), 48 deletions(-)
Signature · 1 line
2.39.2