btrfs: zoned: replace active_total_bytes counter
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 1 replyIn review
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/ | +26 | 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 [PATCH 0/2] btrfs: zoned: replace active_total_bytes counter
This series depends on clean up part (patches 1 and 2) of Josef's series.
https://lore.kernel.org/linux-btrfs/[email protected]/
The naming of space_info->active_total_bytes is misleading. It counts not only active block groups but also full ones which are previously active but now inactive. That confusion results in a bug not counting the full BGs into active_total_bytes on mount time.
Instead, we can count the whole region of a newly allocated block group as zone_unusable. Then, once that block group is activated, release [0 .. zone_capcity] from the zone_unusable counters. With this, we can eliminate the confusing ->active_total_bytes and the code will be common among regular and the zoned mode.
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 | 27 +++++++++++++++++-------- 5 files changed, 35 insertions(+), 48 deletions(-)
Signature · 1 line
2.39.2