Message ID | 20220822040840.614891-1-naohiro.aota@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: zoned: revert mistakenly removed space accounting | expand |
On Mon, Aug 22, 2022 at 01:08:40PM +0900, Naohiro Aota wrote: > The commit ee1cd63d10a8 ("btrfs: convert block group bit field to use bit > helpers") removed an accounting of space_info->active_total_bytes, maybe by > mistake. Revert it back to make the active zone tracking properly work > again. > > Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com> Good catch, added to misc-next, thanks.
diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c index 61ae58c3a354..0043c09667c0 100644 --- a/fs/btrfs/zoned.c +++ b/fs/btrfs/zoned.c @@ -1893,6 +1893,7 @@ bool btrfs_zone_activate(struct btrfs_block_group *block_group) /* Successfully activated all the zones */ set_bit(BLOCK_GROUP_FLAG_ZONE_IS_ACTIVE, &block_group->runtime_flags); + space_info->active_total_bytes += block_group->length; spin_unlock(&block_group->lock); btrfs_try_granting_tickets(fs_info, space_info); spin_unlock(&space_info->lock);
The commit ee1cd63d10a8 ("btrfs: convert block group bit field to use bit helpers") removed an accounting of space_info->active_total_bytes, maybe by mistake. Revert it back to make the active zone tracking properly work again. Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com> --- fs/btrfs/zoned.c | 1 + 1 file changed, 1 insertion(+)