Message ID | cover.1678689012.git.naohiro.aota@wdc.com (mailing list archive) |
---|---|
Headers | show |
Series | btrfs: zoned: replace active_total_bytes counter | expand |
On Mon, Mar 13, 2023 at 04:06:12PM +0900, Naohiro Aota wrote: > This series depends on clean up part (patches 1 and 2) of Josef's series. > > https://lore.kernel.org/linux-btrfs/cover.1677705092.git.josef@toxicpanda.com/ > > 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 Added to misc-next with the two patches from Josef's series, thanks.