From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org
Cc: dsterba@suse.cz, Austin S Hemmelgarn <ahferroin7@gmail.com>,
Christoph Anton Mitterer <calestyo@scientia.net>,
Duncan <1i5t5.duncan@cox.net>
Subject: Re: [PATCH v2 0/5] Make btrfs-progs really compatible with any kernel version
Date: Tue, 24 Nov 2015 21:04:54 +0800 [thread overview]
Message-ID: <56546076.4090709@oracle.com> (raw)
In-Reply-To: <1448283378-10579-1-git-send-email-anand.jain@oracle.com>
Thanks for comments.
Distro would also want to use the latest btrfs-progs on older kernel
since it will have latest fsck/send/receive fixes, better UI
and updated man pages.
btrfs-progs which claim backward kernel compatible and it shouldn't
fail on the below cmd when the btrfs-progs is upgraded.
mkfs.btrfs /dev/sda && mount /dev/sda /btrfs
but it does in some test cases.
A warning is unnecessary IMO. Imagine user who upgrade progs for
better doc/UI and have no intention to upgrade the kernel, gets a
Warning!. If user does not upgrade kernel its a fair assumption
that they don't need/not-looking for latest kernel features. (What
did I miss ?).
Next.
For users looking to have a disk-layout which is compatible with
older kernels (and may not be a running kernel), then with the
current patch set its quite possible to do something like below,
mkfs.btrfs -O as-per-kernel=3.2
mkfs.btrfs -O as-per-kernel=4.0
mkfs.btrfs -O as-per-kernel=x.x (anything)
And only those features that are supported until version x.x
(mainline) will be enabled by default unless user want to over
default totally by using -O <feature>.
Thanks, Anand
Anand Jain wrote:
> Btrfs-progs is a tool for the btrfs kernel and we hope latest btrfs-progs
> be compatible w any set of older/newer kernels.
>
> So far mkfs.btrfs and btrfs-convert sets the default features, for eg,
> skinny-metadata even if the running kernel does not supports it, and
> so the mount fails on the running.
>
> Here in this set of patches will make sure the progs understands the
> kernel supported features.
>
> So in this patch, checks if sysfs tells whether the feature is
> supported if not, then it will relay on static kernel version which
> provided that feature (skinny-metadata here in this example), next
> if for some reason the running kernel does not provide the kernel
> version, then it will fall back to the original method to enable
> the feature with a hope that kernel will support it.
>
> Also the last patch adds a warning when we fail to read either
> sysfs features or the running kernel version.
>
> With this I hope all the concerns from the review comments are
> addressed.
>
>
> Anand Jain (5):
> btrfs-progs: introduce framework to check kernel supported features
> btrfs-progs: add framework to check features supported by sysfs
> btrfs-progs: kernel based default features for mkfs
> btrfs-progs: kernel based default features for btrfs-convert
> btrfs-progs: add warning when we fail to read sysfs or kernel version
>
> btrfs-convert.c | 18 ++++++-
> mkfs.c | 22 ++++++++-
> utils.c | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
> utils.h | 2 +
> 4 files changed, 173 insertions(+), 15 deletions(-)
>
next prev parent reply other threads:[~2015-11-24 13:05 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-23 12:56 [PATCH v2 0/5] Make btrfs-progs really compatible with any kernel version Anand Jain
2015-11-23 12:56 ` [PATCH v2 1/5] btrfs-progs: introduce framework to check kernel supported features Anand Jain
2015-11-24 14:39 ` Mike Fleetwood
2015-11-24 20:21 ` Austin S Hemmelgarn
2015-11-26 17:38 ` David Sterba
2015-11-30 12:30 ` Austin S Hemmelgarn
2015-11-25 10:58 ` [PATCH v3 " Anand Jain
2015-11-23 12:56 ` [PATCH v2 2/5] btrfs-progs: add framework to check features supported by sysfs Anand Jain
2015-11-23 12:56 ` [PATCH v2 3/5] btrfs-progs: kernel based default features for mkfs Anand Jain
2015-11-23 15:57 ` Christoph Anton Mitterer
2015-11-23 16:05 ` Austin S Hemmelgarn
2015-11-23 16:14 ` Christoph Anton Mitterer
2015-11-23 16:55 ` Austin S Hemmelgarn
2015-11-23 12:56 ` [PATCH v2 4/5] btrfs-progs: kernel based default features for btrfs-convert Anand Jain
2015-11-23 12:56 ` [PATCH 5/5] btrfs-progs: add warning when we fail to read sysfs or version Anand Jain
2015-11-23 17:56 ` [PATCH v2 0/5] Make btrfs-progs really compatible with any kernel version David Sterba
2015-11-23 20:14 ` Austin S Hemmelgarn
2015-11-24 6:29 ` Duncan
2015-11-24 13:22 ` Anand Jain
2015-12-04 1:44 ` Liu Bo
2015-12-04 2:08 ` Qu Wenruo
2015-12-04 2:53 ` Liu Bo
2015-12-04 3:57 ` Qu Wenruo
2015-12-04 18:23 ` Liu Bo
2015-12-04 14:19 ` David Sterba
2015-12-05 5:12 ` Anand Jain
2015-11-24 13:04 ` Anand Jain [this message]
2016-11-08 13:14 ` Anand Jain
2016-11-14 12:13 ` David Sterba
2016-11-22 8:54 ` Anand Jain
2016-11-22 13:16 ` David Sterba
2016-11-23 3:00 ` Anand Jain
2016-11-23 10:31 ` David Sterba
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=56546076.4090709@oracle.com \
--to=anand.jain@oracle.com \
--cc=1i5t5.duncan@cox.net \
--cc=ahferroin7@gmail.com \
--cc=calestyo@scientia.net \
--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).