public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Marcos Paulo de Souza <marcos@mpdesouza.com>
Cc: dsterba@suse.com, linux-btrfs@vger.kernel.org,
	Marcos Paulo de Souza <mpdesouza@suse.com>
Subject: Re: [PATCH] btrfs: super.c: Set compress_level=0 when using compress=lzo
Date: Tue, 11 Aug 2020 16:22:24 +0200	[thread overview]
Message-ID: <20200811142224.GS2026@twin.jikos.cz> (raw)
In-Reply-To: <20200803195501.30528-1-marcos@mpdesouza.com>

On Mon, Aug 03, 2020 at 04:55:01PM -0300, Marcos Paulo de Souza wrote:
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -614,6 +614,8 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
>  			} else if (strncmp(args[0].from, "lzo", 3) == 0) {
>  				compress_type = "lzo";
>  				info->compress_type = BTRFS_COMPRESS_LZO;
> +				/* lzo does not expose compression levels */
> +				info->compress_level = 0;

I had that as a fixup in patches fixing the other message errors, with
info->compress_level = 1.

With level 0 it'll print

	btrfs_info(info, "%s %s compression, level %d",
		   (compress_force) ? "force" : "use",
		   compress_type, info->compress_level);


	"use lzo compression, level 0"

Which might be confusing as well, but super.c:btrfs_show_options will
not print the level in that case so I think it's fine with 0.

      parent reply	other threads:[~2020-08-11 14:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-03 19:55 [PATCH] btrfs: super.c: Set compress_level=0 when using compress=lzo Marcos Paulo de Souza
2020-08-11 14:12 ` David Sterba
2020-08-11 14:22 ` David Sterba [this message]

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=20200811142224.GS2026@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=marcos@mpdesouza.com \
    --cc=mpdesouza@suse.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