Re: [PATCH] btrfs: zoned: disable space cache using proper function
From: Qu Wenruo <hidden>
Date: 2021-05-14 10:05:29
From: Qu Wenruo <hidden>
Date: 2021-05-14 10:05:29
On 2021/5/14 上午10:03, Naohiro Aota wrote:
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. Thanks, Qu
} else {
btrfs_set_opt(info->mount_opt, SPACE_CACHE);
}