From: David Sterba <dsterba@suse.cz>
To: dsterba@suse.cz, Tsutomu Itoh <t-itoh@jp.fujitsu.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH V2] Btrfs: fix output of compression message in btrfs_parse_options()
Date: Thu, 14 Jan 2016 15:21:44 +0100 [thread overview]
Message-ID: <20160114142144.GY4227@twin.jikos.cz> (raw)
In-Reply-To: <20160114142043.GX4227@twin.jikos.cz>
On Thu, Jan 14, 2016 at 03:20:43PM +0100, David Sterba wrote:
> On Thu, Jan 14, 2016 at 09:09:14AM +0900, Tsutomu Itoh wrote:
> > On 2016/01/13 21:33, David Sterba wrote:
> > > On Wed, Jan 06, 2016 at 05:03:40PM +0900, Tsutomu Itoh wrote:
> > >> } else if (strncmp(args[0].from, "no", 2) == 0) {
> > >> compress_type = "no";
> > >> btrfs_clear_opt(info->mount_opt, COMPRESS);
> > >> btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS);
> > >> compress_force = false;
> > >> + no_compress++;
> > >> } else {
> > > ...
> > >> + if ((btrfs_test_opt(root, COMPRESS) &&
> > >> + (info->compress_type != saved_compress_type ||
> > >> + compress_force != saved_compress_force)) ||
> > >> + (!btrfs_test_opt(root, COMPRESS) &&
> > >> + no_compress == 1)) {
> > >
> > > If there are more than one 'compress=no' then the message won't be
> > > printed. I don't see a reason for doing no_compress++ above.
> >
> > I want to output message as follows. Therefore, no_compress++ is necessary.
> >
> > # mount -o compress,compress,compress=no,compress=no,compress,compress=no <dev> <path>
> >
> > [ 162.048033] BTRFS: device fsid a7f6e96e-653e-42d0-8469-13025396caa2 devid 1 transid 3 <dev>
> > [ 185.349034] BTRFS info (device <dev>): use zlib compression
> > [ 185.349041] BTRFS info (device <dev>): use no compression
> > [ 185.349045] BTRFS info (device <dev>): use zlib compression
> > [ 185.349048] BTRFS info (device <dev>): use no compression
> > [ 185.349050] BTRFS info (device <dev>): disk space caching is enabled
>
> I don't think it's necessary ty print all the options. Only the last one
> is applied so I'd expect to see only "... use no compression".
... but we do print all the options as we find them already, never mind.
next prev parent reply other threads:[~2016-01-14 14:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-06 8:03 [PATCH V2] Btrfs: fix output of compression message in btrfs_parse_options() Tsutomu Itoh
2016-01-13 12:33 ` David Sterba
2016-01-14 0:09 ` Tsutomu Itoh
2016-01-14 14:20 ` David Sterba
2016-01-14 14:21 ` David Sterba [this message]
2016-01-15 0:14 ` Tsutomu Itoh
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=20160114142144.GY4227@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=t-itoh@jp.fujitsu.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).