All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: Hugo Mills <hugo@carfax.org.uk>,
	Cyril Scetbon <cyril.scetbon@free.fr>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Compatibility matrix kernel/tools
Date: Thu, 6 Nov 2014 09:51:31 +0800	[thread overview]
Message-ID: <545AD423.2010600@cn.fujitsu.com> (raw)
In-Reply-To: <20141105214515.GD21247@carfax.org.uk>


-------- Original Message --------
Subject: Re: Compatibility matrix kernel/tools
From: Hugo Mills <hugo@carfax.org.uk>
To: Cyril Scetbon <cyril.scetbon@free.fr>
Date: 2014年11月06日 05:45
> On Wed, Nov 05, 2014 at 09:57:31PM +0100, Cyril Scetbon wrote:
>> Hi,
>>
>> Where can I find the compatibility matrix to know which btrfs-tools version should work with a chosen linux kernel ?
>     Any of them should work with any kernel.
>
>     For normal operation, if the tools are too old, they may not
> support newer kernel features -- but that will simply mean you can't
> access the feature, not that anything will be broken.
>
>     If you're doing recovery work (btrfs check and friends) then using
> the latest released version of the tools is strongly recommended.
>
>     Hugo.
>
As Hugo mentioned, overall any kernel/user tool combination should be OK 
and won't cause disaster.

[Online operations]
More specifically, online(btrfs mounted) operations mostly depend on the 
kernel.
Like subvolume/snapshot device add/remove/replace balance/scrub and 
send/receive should mainly depend on the
kernel version.

[If version not match]
1. Kernel ver > progs ver.
It may happens that progs don't know the new added ioctls, so some 
bleeding edge functions may not be available,
but everything should work fine without problem.(except some known/fixed 
progs bugs)

2. Progs ver > kernel ver.
It may happen some ioctl not supported by kernel, if there is a fallback 
method everything should work without problem,
or progs should prompt the fact that some bleeding edge function is not 
supported by kernel.
Everything should also works fine except some known/fixed kernel bugs, 
which maybe worse than progs bugs.

[Offline operations]
Offline operations includes mkfs, btrfsck and all its 
friends(btrfs-find-roots btrfs-show-super btrfs-debug-tree ...)
Since offline operations needs to do some dirty job like reading/writing 
the superblock, it may cause big compatibility problem
if using some new incompact features.

[If version not match]
1. kernel ver > progs ver.
There maybe some btrfs filesystems that kernel can mount but offline 
tools can't open.
For example, before v0.20-rc1 progs doesn't support skinny metadata, and 
3.17 kernel supports it,
a btrfs created with skinny metadata can't be fscked using v0.20-rc1, 
but kernel can still mount it,
and online operations should be fine.

If not using the new features, it would be OK.

2. kernel ver < progs ver
This maybe even worse.
If you create a fs with latest progs, which may enable some new feature 
like big metadata on *DEFAULT*,
kernels before v3.3 will be unable to even mount it since it can't 
understand the new incompact features.


[Conclusion]
If not using offline operations often, compatibility won't be a big problem.
If using offline operations often, better keep kernel/progs version from 
differing too much.

Also if you want to keep a matrix for it, it may take some time to git 
blame/log/describe...
Tips will be focus on INCOMPACT flags in fs/btrfs/ctree.h and ioctls 
change in fs/btrfs/ioctl.c.

Thanks,
Qu

  reply	other threads:[~2014-11-06  1:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05 20:57 Compatibility matrix kernel/tools Cyril Scetbon
2014-11-05 21:45 ` Hugo Mills
2014-11-06  1:51   ` Qu Wenruo [this message]
2014-11-06  5:29     ` Anand Jain
2014-11-06  9:21     ` Cyril Scetbon
2014-11-07  3:38       ` Duncan

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=545AD423.2010600@cn.fujitsu.com \
    --to=quwenruo@cn.fujitsu.com \
    --cc=cyril.scetbon@free.fr \
    --cc=hugo@carfax.org.uk \
    --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 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.