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: Fri, 15 Jan 2016 09:14:49 +0900 [thread overview]
Message-ID: <569839F9.20405@jp.fujitsu.com> (raw)
In-Reply-To: <20160114142043.GX4227@twin.jikos.cz>
On 2016/01/14 23:20, 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".
I see.
However, the output of other options are also the same as the above-mentioned.
e.g.
# mount -o discard,nodiscard,discard <dev> <path>
[56714.781948] BTRFS: device fsid 22f3af7e-0f1c-40fe-8eb1-091df7bd1da2 devid 1 transid 3 <dev>
[56736.296779] BTRFS info (device <dev>): turning on discard
[56736.296785] BTRFS info (device <dev>): turning off discard
[56736.296789] BTRFS info (device <dev>): turning on discard
[56736.296792] BTRFS info (device <dev>): disk space caching is enabled
Thanks,
Tsutomu
prev parent reply other threads:[~2016-01-15 0:15 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
2016-01-15 0:14 ` Tsutomu Itoh [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=569839F9.20405@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 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).