All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
To: dsterba@suse.cz
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH V2] Btrfs: fix output of compression message in btrfs_parse_options()
Date: Thu, 14 Jan 2016 09:09:14 +0900	[thread overview]
Message-ID: <5696E72A.9080904@jp.fujitsu.com> (raw)
In-Reply-To: <20160113123343.GP4227@twin.jikos.cz>

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

Thanks,
Tsutomu

>
>> +				btrfs_info(root->fs_info,
>> +					   "%s %s compression",
>> +					   (compress_force) ? "force" : "use",
>> +					   compress_type);
>> +			}
>> +			compress_force = false;
>>   			break;
>>   		case Opt_ssd:
>>   			btrfs_set_and_info(root, SSD,
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


  reply	other threads:[~2016-01-14  0:09 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 [this message]
2016-01-14 14:20     ` David Sterba
2016-01-14 14:21       ` David Sterba
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=5696E72A.9080904@jp.fujitsu.com \
    --to=t-itoh@jp.fujitsu.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.