From: Chao Yu <chao@kernel.org>
To: Yangtao Li <frank.li@vivo.com>, Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [RESEND] f2fs: set default compress option only when sb_has_compression
Date: Wed, 5 Apr 2023 10:51:58 +0800 [thread overview]
Message-ID: <b5f99276-29cd-ca61-abc2-a927d992f40a@kernel.org> (raw)
In-Reply-To: <20230330165648.33907-1-frank.li@vivo.com>
On 2023/3/31 0:56, Yangtao Li wrote:
> If the compress feature is not enabled, there is no need to set
> compress-related parameters.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Patch looks fine, but it's better to fix similar issues in one
patch.
e.g.
f2fs: add compression feature check for all compress mount opt
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
> ---
> fs/f2fs/super.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 768be1c76a47..b5828a67f7c1 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -2073,10 +2073,12 @@ static void default_options(struct f2fs_sb_info *sbi)
> F2FS_OPTION(sbi).fsync_mode = FSYNC_MODE_POSIX;
> F2FS_OPTION(sbi).s_resuid = make_kuid(&init_user_ns, F2FS_DEF_RESUID);
> F2FS_OPTION(sbi).s_resgid = make_kgid(&init_user_ns, F2FS_DEF_RESGID);
> - F2FS_OPTION(sbi).compress_algorithm = COMPRESS_LZ4;
> - F2FS_OPTION(sbi).compress_log_size = MIN_COMPRESS_LOG_SIZE;
> - F2FS_OPTION(sbi).compress_ext_cnt = 0;
> - F2FS_OPTION(sbi).compress_mode = COMPR_MODE_FS;
> + if (f2fs_sb_has_compression(sbi)) {
> + F2FS_OPTION(sbi).compress_algorithm = COMPRESS_LZ4;
> + F2FS_OPTION(sbi).compress_log_size = MIN_COMPRESS_LOG_SIZE;
> + F2FS_OPTION(sbi).compress_ext_cnt = 0;
> + F2FS_OPTION(sbi).compress_mode = COMPR_MODE_FS;
> + }
> F2FS_OPTION(sbi).bggc_mode = BGGC_MODE_ON;
> F2FS_OPTION(sbi).memory_mode = MEMORY_MODE_NORMAL;
>
next prev parent reply other threads:[~2023-04-05 2:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 16:56 Yangtao Li
2023-04-05 2:51 ` Chao Yu [this message]
2023-04-05 16:20 ` [f2fs-dev] " patchwork-bot+f2fs
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=b5f99276-29cd-ca61-abc2-a927d992f40a@kernel.org \
--to=chao@kernel.org \
--cc=frank.li@vivo.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.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®