linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Chao Yu <yuchao0@huawei.com>
Cc: jaegeuk@kernel.org, linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH RESEND] f2fs: compress: deny setting unsupported compress algorithm
Date: Mon, 7 Dec 2020 10:16:53 -0800	[thread overview]
Message-ID: <X85xlc2Q0gnBywBE@gmail.com> (raw)
In-Reply-To: <20201207095609.73825-1-yuchao0@huawei.com>

On Mon, Dec 07, 2020 at 05:56:09PM +0800, Chao Yu wrote:
> If kernel doesn't support certain kinds of compress algorithm, deny to set
> them as compress algorithm of f2fs via 'compress_algorithm=%s' mount option.
> 
> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> ---
> no changes, just rebase on dev branch.

This doesn't apply to the dev branch anymore.

>  fs/f2fs/super.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index e0fe72f1d2c8..662e59f32645 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -936,9 +936,14 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
>  			if (!name)
>  				return -ENOMEM;
>  			if (!strcmp(name, "lzo")) {
> +#ifdef CONFIG_F2FS_FS_LZO
>  				F2FS_OPTION(sbi).compress_algorithm =
>  								COMPRESS_LZO;
> +#else
> +				f2fs_info(sbi, "Image doesn't support lzo compression");
> +#endif

These info messages don't make sense.  It's not the filesystem image that
doesn't support the algorithm, but rather the kernel that doesn't.

Also, shouldn't these be warnings instead of "info"?

- Eric

  reply	other threads:[~2020-12-07 18:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-07  9:56 [PATCH RESEND] f2fs: compress: deny setting unsupported compress algorithm Chao Yu
2020-12-07 18:16 ` Eric Biggers [this message]
2020-12-08  1:09   ` [f2fs-dev] " Chao Yu
2020-12-08  3:29     ` Chao Yu

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=X85xlc2Q0gnBywBE@gmail.com \
    --to=ebiggers@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yuchao0@huawei.com \
    /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;
as well as URLs for NNTP newsgroup(s).