From: Chris Mason <chris.mason@fusionio.com>
To: David Sterba <dsterba@suse.cz>, <linux-btrfs@vger.kernel.org>
Cc: David Sterba <dsterba@suse.cz>
Subject: Re: [PATCH] btrfs-progs: mkfs: extend -O syntax to disable features
Date: Thu, 14 Nov 2013 08:56:13 -0500 [thread overview]
Message-ID: <20131114135613.3802.45079@localhost.localdomain> (raw)
In-Reply-To: <1384435845-8493-1-git-send-email-dsterba@suse.cz>
Quoting David Sterba (2013-11-14 08:30:45)
> A way of disabling features that are on by default in case it's not
> wanted, eg. due to lack of support in the used kernel.
>
> Signed-off-by: David Sterba <dsterba@suse.cz>
> ---
> mkfs.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/mkfs.c b/mkfs.c
> index cd0af9ef8b4f..f825e1b6bc2d 100644
> --- a/mkfs.c
> +++ b/mkfs.c
> @@ -1168,7 +1168,11 @@ static int parse_one_fs_feature(const char *name, u64 *flags)
> int found = 0;
>
> for (i = 0; i < ARRAY_SIZE(mkfs_features); i++) {
> - if (!strcmp(mkfs_features[i].name, name)) {
> + if (name[0] == '^' &&
> + !strcmp(mkfs_features[i].name, name + 1)) {
> + *flags &= ~ mkfs_features[i].flag;
> + found = 1;
> + } else if (!strcmp(mkfs_features[i].name, name)) {
> *flags |= mkfs_features[i].flag;
> found = 1;
> }
Perfect, I was going to do this today so I can enable extrefs.
-chris
next prev parent reply other threads:[~2013-11-14 13:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 13:30 [PATCH] btrfs-progs: mkfs: extend -O syntax to disable features David Sterba
2013-11-14 13:56 ` Chris Mason [this message]
2013-11-14 14:14 ` David Sterba
2013-11-14 17:26 ` Chris Mason
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=20131114135613.3802.45079@localhost.localdomain \
--to=chris.mason@fusionio.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).