* [PATCH] btrfs: zoned: revert mistakenly removed space accounting
@ 2022-08-22 4:08 Naohiro Aota
2022-08-22 17:55 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Naohiro Aota @ 2022-08-22 4:08 UTC (permalink / raw)
To: linux-btrfs; +Cc: Naohiro Aota
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(+)
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);
--
2.37.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs: zoned: revert mistakenly removed space accounting
2022-08-22 4:08 [PATCH] btrfs: zoned: revert mistakenly removed space accounting Naohiro Aota
@ 2022-08-22 17:55 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2022-08-22 17:55 UTC (permalink / raw)
To: Naohiro Aota; +Cc: linux-btrfs
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-22 18:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-22 4:08 [PATCH] btrfs: zoned: revert mistakenly removed space accounting Naohiro Aota
2022-08-22 17:55 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox