[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3cc99567-b3e6-419f-820c-f772e26aa85d@linux.alibaba.com>
Date: Tue, 12 Nov 2024 11:09:55 +0800
From: Gao Xiang <hsiangkao@...ux.alibaba.com>
To: Chunhai Guo <guochunhai@...o.com>, xiang@...nel.org
Cc: chao@...nel.org, huyue2@...lpad.com, jefflexu@...ux.alibaba.com,
dhavale@...gle.com, linux-erofs@...ts.ozlabs.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] erofs: clean up the cache if cached decompression is
disabled
On 2024/11/12 11:15, Chunhai Guo wrote:
> Clean up the cache when cached decompression strategy is changed to
> EROFS_ZIP_CACHE_DISABLED by remount.
>
> Signed-off-by: Chunhai Guo <guochunhai@...o.com>
> ---
> fs/erofs/super.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> index 320d586c3896..de2af862e65b 100644
> --- a/fs/erofs/super.c
> +++ b/fs/erofs/super.c
> @@ -743,6 +743,11 @@ static int erofs_fc_reconfigure(struct fs_context *fc)
> else
> fc->sb_flags &= ~SB_POSIXACL;
>
> + if (new_sbi->opt.cache_strategy == EROFS_ZIP_CACHE_DISABLED) {
I guess we need to check if
(sbi->opt.cache_strategy != new_sbi->opt.cache_strategy &&
new_sbi->opt.cache_strategy == EROFS_ZIP_CACHE_DISABLED)
Thanks,
Gao Xiang
> + mutex_lock(&sbi->umount_mutex);
> + z_erofs_shrink_scan(sbi, ~0UL);
> + mutex_unlock(&sbi->umount_mutex);
> + }
> sbi->opt = new_sbi->opt;
>
> fc->sb_flags |= SB_RDONLY;
Powered by blists - more mailing lists