Thread (6 messages) 6 messages, 3 authors, 2021-05-18

Re: [PATCH] btrfs: zoned: disable space cache using proper function

From: David Sterba <hidden>
Date: 2021-05-14 15:33:28

On Fri, May 14, 2021 at 06:05:05PM +0800, Qu Wenruo wrote:

On 2021/5/14 上午10:03, Naohiro Aota wrote:
quoted
As btrfs_set_free_space_cache_v1_active() is introduced, this patch uses
it to disable space cache v1 properly.

Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
---
  fs/btrfs/super.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 4a396c1147f1..89ffc17d074c 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -592,7 +592,7 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
  		if (btrfs_is_zoned(info)) {
  			btrfs_info(info,
  			"zoned: clearing existing space cache");
-			btrfs_set_super_cache_generation(info->super_copy, 0);
+			btrfs_set_free_space_cache_v1_active(info, false);
Can we have a better naming?

The set_..._active() really looks like to *enable* space cache, other
than disabling it.
Agreed, it's really confusing and does the opposite of the name, this
needs fixing.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help