linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Anand Jain <anand.jain@oracle.com>,
	Qu Wenruo <quwenruo@cn.fujitsu.com>,
	linux-btrfs@vger.kernel.org
Cc: dsterba@suse.cz, calestyo@scientia.net, ahferroin7@gmail.com,
	1i5t5.duncan@cox.net
Subject: Re: [PATCH 0/7] Let user specify the kernel version for features
Date: Sun, 29 Nov 2015 09:21:27 +0800	[thread overview]
Message-ID: <565A5317.8040506@gmx.com> (raw)
In-Reply-To: <56581742.9030308@oracle.com>



On 11/27/2015 04:41 PM, Anand Jain wrote:
>
>
>
>
>> I meant, it can be done in packaging level and it's much easier to do.
>
>   Its all about trade off, and there is no right or wrong, so is tough
>   to arrive at a conclusion even before this was implemented. Below are
>   the choices considered, now putting in the order of least suitable
>   to most suitable after reviewing their advantages and disadvantages.
>
>   . Update default features at the compile time, so to have a define
>     set for the default choices per release/distro. (not sure how to
>     do that), But with this, you can not solve the problem for which
>     current "-O comp=" is provided (i.e to provide features which are
>     compatible across a set of known kernels). And mainly, you are
>     letting the control of such a discussion out of btrfs/mainline.
>     Then distros will have own set of default features instead of having
>     such an effort discussed and converged at the mainline.

No need to set default feature per distro, we have make it clear, our 
btrfs-progs defaults feature are these, if the distro doesn't like it, 
do the backport yourself.

>
>   . /etc/btrfs.conf file to hold the default features (same as ext4)
>     I have to drop this idea since from the user point of view you are
>     creating another source of config/input that user/distro has to
>     care about.
>

No need as described above.

>   . 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).
>

As stated several times, kernel version based probe is inaccurate, as 
long as your goal is to ensure the fs can be mounted, you are wasting 
time as such probe won't meet your goal.

Even as a fallback method, it's not reliable and super easy to avoid.
Just remove the btrfs module.
Then all the features are just based on vanilla kernel version, which is 
far from the real kernel.


As long as your goal is to ensure a fs after mkfs can be used without 
error, you're already in a nightmare.
What if the kernel doesn't has btrfs compiled?
What if the fs is not only for kernel to mount, but also a boot 
partition for grub?
Do you need to check the grub2 version? Check if this is a /boot partition?

You want to handle them all? This is not the right place, you're in the 
field of distro, not btrfs-progs.


Recently I just encountered such problem. Latest xfs-progs makes xfs 
version 5 by default, but grub2 can't handle version 5 yet in latest 
stable version.
Then system can't even boot into grub2.

Did you see Dave trying to add such grub2 version based probe to change 
mkfs.xfs features?
No, just because that's not the way things should be done.

>
>> And it's much predictable than version based detection.
>
>   I think you mean to say its not predictable because it follows
>   a priority list, and we won't know which system used sysfs/version/
>   progs-version. Concern is valid. But I feel its trivial, unless
>   you have some strong reason. Further still its only a trade off that
>   could achieve.
>
>   Other concern that others commented..
>
>   if sysfs is not there and feature is backported, for this we should
>   ensure sysfs feature is also backported along with the feature it
>   self, without that feature back port is incomplete.

Just remove the btrfs module, then sysfs probe just become meaningless.

If something wrong may happen, then it will happen.
And the wrong thing is vanilla version based probe.

You are already messing up what btrfs-progs should do and what a distro 
should do.

Thanks,
Qu

> If distro does not
>   want to backport sysfs, the other choice that disto has is to update
>   the feature-to-version table in the progs.
>
>   For the system which does not provide version at all, it will fail
>   back to the original progs-version-based-defaults.
>
>
>   Hope I have captured all the concerns and addressed them.
>
>
> Thanks, Anand
>
>

  reply	other threads:[~2015-11-29  1:21 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 [this message]
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
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=565A5317.8040506@gmx.com \
    --to=quwenruo.btrfs@gmx.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@cn.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).