mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Chunhai Guo <guochunhai@vivo.com>, xiang@kernel.org
Cc: chao@kernel.org, huyue2@coolpad.com, jefflexu@linux.alibaba.com,
	dhavale@google.com, linux-erofs@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] erofs: clean up the cache if cached decompression is disabled
Date: Tue, 12 Nov 2024 11:09:55 +0800	[thread overview]
Message-ID: <3cc99567-b3e6-419f-820c-f772e26aa85d@linux.alibaba.com> (raw)
In-Reply-To: <20241112031513.528474-1-guochunhai@vivo.com>



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@vivo.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;


  reply	other threads:[~2024-11-12  3:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-12  3:15 Chunhai Guo
2024-11-12  3:09 ` Gao Xiang [this message]
2024-11-12 10:39 ` kernel test robot
2024-11-12 11:42 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3cc99567-b3e6-419f-820c-f772e26aa85d@linux.alibaba.com \
    --to=hsiangkao@linux.alibaba.com \
    --cc=chao@kernel.org \
    --cc=dhavale@google.com \
    --cc=guochunhai@vivo.com \
    --cc=huyue2@coolpad.com \
    --cc=jefflexu@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®