All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <dsterba@suse.cz>, Qu Wenruo <quwenruo.btrfs@gmx.com>,
	Anand Jain <anand.jain@oracle.com>, <linux-btrfs@vger.kernel.org>,
	<calestyo@scientia.net>, <ahferroin7@gmail.com>,
	<1i5t5.duncan@cox.net>
Subject: Re: [PATCH 0/7] Let user specify the kernel version for features
Date: Thu, 4 Feb 2016 09:12:50 +0800	[thread overview]
Message-ID: <56B2A592.3000305@cn.fujitsu.com> (raw)
In-Reply-To: <20160203105038.GL31992@twin.jikos.cz>



David Sterba wrote on 2016/02/03 11:50 +0100:
> Going back to this discussion,
>
> On Mon, Nov 30, 2015 at 01:46:15PM +0800, Qu Wenruo wrote:
>> To be honest, how many guys really unhappy with current default features
>> behavior *except* you?
>
> Me too.
>
> Anand's summary matches my view of how we should do it:
>
> ". Do it at run time for the running kernel. Current. In the order of
>     priority .. check sysfs, if not check kernel-version, if not use
>     progs-version-based-defaults (original)."

I'm curious under which case btrfs will fallback to 
progs-version-based-default, as I though kernel-version probe will make 
it never go to progs-version-based one. (Maybe non-numeric kernel version?)

>
> I understand that the the kernel version is not always reliable, but
> when we use it only as a fallback we know that at least kernel of this
> upstream version can mount the filesystem.

Yes, upstream version can mount it, but it does not always make sense.

For example, the kernel used by user may doesn't contain btrfs 
modules/built-in.
We shouldn't do extra check even trying to ensure something we can't ensure.

>
> And becase we can turn on additional features later this should not be a
> blocker.
>
> I disagree with your view that the weight should be put on the distro
> integrators. I've been packaging btrfs-progs for the SLES and openSUSE,
> several product lines with different kernels (upstream and backports).
> Keeping the features in sync with kernel started to be an issue with the
> first incompat feature that was different among the kernels. And we want
> change the defaults further.
>
> The main user bases that I take into account:
>
> * upstream community, ie. the latest stable version or the git version
> * older stable trees, ie. 3.2, 3.14 up to 4.1
> * heavy backports to enterprise kernels, arbitrary base version
>
> My idea of the default behaviour is to be able to use latest btrfs-progs
> (released or git) on any of them and minimize possible damage. Ie.
> respect the running kernel and try to best detect the features.

OK, but I didn't see anything sysfs-based probe can't handle.
(Except kernel doesn't support btrfs sysfs interface)

Personally, I just prefer to deprecate any kernel doesn't support btrfs 
features sysfs interface, and give a strong enough warning.

So my idea about the workflow would be:
1) Check sysfs feature interface and use it.
2) Fallback to progs-default-feature unless '-f' is given.

Much more straightforward and makes sense for me.
If kernel is too old without the sysfs intreface backported (or without 
btrfs modules/built-in), it's a very bad idea to use btrfs.

>
> Besides ancient kernels and the 3.2 that's still in use, the sysfs based
> detection should work.

Ancient kernels (including 3.2 though) without heavy backports are never 
a good idea to run btrfs on.
So I just like to deprecate them in btrfs-progs.

>
>> Or how many bug report in maillist/bugzilla is about that?
>>
>> Introducing a new feature matrix only to change the behavior to your flavor?
>> Isn't this what you called "bloated intelligence"?
>
> I'm not sure why you see the feature matrix getting more complicated.
> The testeres and developers know what features to turn on if desired,
> testing recent kernel with recent progs will do the right thing on
> itself.  The rest of the user are supposed to just install and use it.
>
>
Your point also shows that, -O ver=X.XX is not needed.
Testers/developers know which exactly feature they need to enable/disable.

And end user just use it, sysfs-based probe handles them quite well.

Ancient kernel users also get warned, so I see no need to use feature 
matrix.

Thanks,
Qu



  reply	other threads:[~2016-02-04  1:13 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25 12:08 [PATCH 0/7] Let user specify the kernel version for features Anand Jain
2015-11-25 12:08 ` [PATCH 1/7] btrfs-progs: show the version for -O list-all Anand Jain
2015-11-25 12:08 ` [PATCH 2/7] btrfs-progs: add kernel alias for each of the features in the list Anand Jain
2015-11-25 13:36   ` [PATCH V1.1 " Anand Jain
2015-11-25 18:11   ` [PATCH " Liu Bo
2015-11-25 22:52     ` Anand Jain
2015-11-25 12:08 ` [PATCH 3/7] btrfs-progs: make is_numerical non static Anand Jain
2015-11-25 12:08 ` [PATCH 4/7] btrfs-progs: check for numerical in version_to_code() Anand Jain
2015-11-25 12:08 ` [PATCH 5/7] btrfs-progs: introduce framework version to features Anand Jain
2015-11-25 12:08 ` [PATCH 6/7] btrfs-progs: add -O comp= option for mkfs.btrfs Anand Jain
2015-11-25 12:08 ` [PATCH 7/7] btrfs-progs: add -O comp= option for btrfs-convert Anand Jain
2015-11-26  2:02 ` [PATCH 0/7] Let user specify the kernel version for features Qu Wenruo
2015-11-26  6:07   ` Anand Jain
2015-11-26  6:53     ` Qu Wenruo
2015-11-26 11:18       ` Anand Jain
2015-11-26 12:31         ` Qu Wenruo
2015-11-26 22:17           ` Anand Jain
2015-11-27  0:44             ` Qu Wenruo
2015-11-27  8:41               ` Anand Jain
2015-11-29  1:21                 ` Qu Wenruo
2015-11-30  4:54                   ` Anand Jain
2015-11-30  5:46                     ` Qu Wenruo
2016-02-03 10:50                       ` David Sterba
2016-02-04  1:12                         ` Qu Wenruo [this message]
2016-02-04  1:42                         ` Chris Mason
2015-11-30  5:44       ` potential btrfs-progs clean up Anand Jain
2015-11-30  6:12         ` Qu Wenruo

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=56B2A592.3000305@cn.fujitsu.com \
    --to=quwenruo@cn.fujitsu.com \
    --cc=1i5t5.duncan@cox.net \
    --cc=ahferroin7@gmail.com \
    --cc=anand.jain@oracle.com \
    --cc=calestyo@scientia.net \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.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 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.