From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
To: <dsterba@suse.cz>, <linux-btrfs@vger.kernel.org>,
<t-itoh@jp.fujitsu.com>
Subject: Re: [PATCH] Btrfs: clear compress-force when remounting with compress option
Date: Wed, 28 May 2014 09:23:43 +0800 [thread overview]
Message-ID: <53853A9F.1020104@cn.fujitsu.com> (raw)
In-Reply-To: <20140527162249.GM5346@twin.jikos.cz>
Hi David,
On 05/28/2014 12:22 AM, David Sterba wrote:
> On Fri, May 23, 2014 at 11:36:52AM +0800, Wang Shilong wrote:
>> --- a/fs/btrfs/super.c
>> +++ b/fs/btrfs/super.c
>> @@ -513,6 +513,14 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
>> btrfs_info(root->fs_info,
>> "btrfs: use %s compression",
>> compress_type);
>> + /*
>> + * If we remount from compress-force=xxx to
>> + * compress=xxx, we need clear FORCE_COMPRESS
>> + * flag, otherwise, there is no way for users
>> + * to disable forcible compression separately.
>> + */
>> + btrfs_clear_and_info(root, FORCE_COMPRESS,
>> + "compress is not forced anymore");
> This adds another message and does not make sense if it's not during
> remount.
The message is output in the following cases:
case1:
# mount -o compress-force=lzo /dev/sdb /mnt
# mount -o remount,compress=lzo /dev/sdb /mnt
case2:
# mount -o compress-force=lzo /dev/sdb /mnt
# mount -o remount,compress-force=no /dev/sdb /mnt
Message won't be printed except remounting, any other case
that i was missing?
> The message "btrfs: use %s compression" could be printed
> unconditionally, we want to see that the compression is requested via
> mount option.
>
> Otherwise, the variable 'compress' does nothing useful and can be
> removed as well.
See many other mount options, if we change it, it will call
btrfs_clear_and_info(....)...
I don't have any taste that whether we need add or remove
this message, if you dosen't like this, i could remove it.
Thanks,
Wang
>> }
>> break;
>> case Opt_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
> .
>
prev parent reply other threads:[~2014-05-28 1:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 3:36 [PATCH] Btrfs: clear compress-force when remounting with compress option Wang Shilong
2014-05-27 16:22 ` David Sterba
2014-05-28 1:23 ` Wang Shilong [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=53853A9F.1020104@cn.fujitsu.com \
--to=wangsl.fnst@cn.fujitsu.com \
--cc=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).