Thread (27 messages) flat view 27 messages, 3 authors, 2021-08-27

Re: [PATCH v2 03/17] btrfs: zoned: calculate free space from zone capacity

From: David Sterba <hidden>
Date: 2021-08-24 15:29:57

On Tue, Aug 24, 2021 at 07:59:38AM +0000, Johannes Thumshirn wrote:
On 19/08/2021 14:27, Naohiro Aota wrote:
quoted
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index da0eee7c9e5f..bb2536c745cd 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -2539,10 +2539,15 @@ static int __btrfs_add_free_space_zoned(struct btrfs_block_group *block_group,
 	u64 offset = bytenr - block_group->start;
 	u64 to_free, to_unusable;
 	const int bg_reclaim_threshold = READ_ONCE(fs_info->bg_reclaim_threshold);
+	bool initial = (size == block_group->length);
+
Nit: Unneeded parenthesis
No it's actually preferred this way for clarity.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help