linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Anand Jain <anand.jain@oracle.com>,
	Qu Wenruo <quwenruo@cn.fujitsu.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [RFC PATCH 1/3] btrfs-progs: introduce framework to check kernel supported features
Date: Wed, 21 Oct 2015 10:12:33 -0500	[thread overview]
Message-ID: <5627AB61.1020305@redhat.com> (raw)
In-Reply-To: <5627A5FC.60605@oracle.com>

On 10/21/15 9:49 AM, Anand Jain wrote:
> 
> 
> On 10/21/2015 10:41 PM, Eric Sandeen wrote:
>> On 10/21/15 4:09 AM, Qu Wenruo wrote:
>>>> +static int get_kernel_code()
>>>> +{
>>>> +    int ret;
>>>> +    struct utsname utsbuf;
>>>> +    char *version;
>>>> +
>>>> +    ret = uname(&utsbuf);
>>>> +    if (ret)
>>>> +        return -ret;
>>>> +
>>>> +    version = strtok(utsbuf.release, "-");
>>>> +
>>>> +    return version_to_code(version);
>>>> +}
>>>
>>> The only problem is, kernel version is never reliable.
>>> If someone wants, uname output may even contain no numeric value.
>>
>> yep, I agree.  This will be misery for any custom kernel.
> 
>  How if we apply this only when kernel version is available ?

The problem is "kernel version" may not match btrfs version.
Distros backport and update subsystems without changing the
kernel version.

>  Otherwise progs will assume all features are supported as in
>  the current design.
> 
> Thanks, Anand

This is only a concern for kernels prior to 3.14, right?
v3.13 was released Sun Jan 19 18:40:23 2014, almost 2 years ago.

What has raised the current concern about these old kernels?
Why does this need fixing in upstream code?

-Eric


      reply	other threads:[~2015-10-21 15:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21  8:45 [RFC PATCH 1/3] btrfs-progs: introduce framework to check kernel supported features Anand Jain
2015-10-21  8:45 ` [RFC PATCH 2/3] btrfs-progs: kernel based default features for mkfs Anand Jain
2015-10-21  9:12   ` Qu Wenruo
2015-10-21 14:15     ` Anand Jain
2015-10-21 14:25       ` Qu Wenruo
2015-10-22  3:09     ` Anand Jain
2015-10-22  4:10       ` Qu Wenruo
2015-10-23 15:24   ` Jeff Mahoney
2015-10-26 11:42     ` Anand Jain
2015-10-21  8:45 ` [RFC PATCH 3/3] btrfs-progs: kernel based default features for btrfs-convert Anand Jain
2015-10-21  9:12   ` Qu Wenruo
2015-10-21  9:09 ` [RFC PATCH 1/3] btrfs-progs: introduce framework to check kernel supported features Qu Wenruo
2015-10-21 14:41   ` Eric Sandeen
2015-10-21 14:49     ` Anand Jain
2015-10-21 15:12       ` Eric Sandeen [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=5627AB61.1020305@redhat.com \
    --to=sandeen@redhat.com \
    --cc=anand.jain@oracle.com \
    --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).