linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Idea on compatibility for old distributions
@ 2016-05-10  1:16 Qu Wenruo
  2016-05-10  1:52 ` Mark Fasheh
  2016-05-10 20:23 ` Eric Sandeen
  0 siblings, 2 replies; 6+ messages in thread
From: Qu Wenruo @ 2016-05-10  1:16 UTC (permalink / raw)
  To: David Sterba, Mark Fasheh; +Cc: btrfs

Hi David, Mark,

In the recent test for new btrfs-convert backward compatibility, I found 
that cmds-fi-du.c uses FIEMAP_EXTENT_SHARED bits, which is not present 
in kernel of old distributions like RHEL6 (Sorry, didn't test on 
openSUSE equivalent).

Unlike e2fsprogs, we can check its version with pkgconfig, any idea to 
avoid such compiling error?

And further more, without kernel support for FIEMAP_EXTENT_SHARED, will 
fi-du work anymore?

Thanks,
Qu



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Idea on compatibility for old distributions
  2016-05-10  1:16 Idea on compatibility for old distributions Qu Wenruo
@ 2016-05-10  1:52 ` Mark Fasheh
  2016-05-10  2:04   ` Qu Wenruo
  2016-05-10 20:23 ` Eric Sandeen
  1 sibling, 1 reply; 6+ messages in thread
From: Mark Fasheh @ 2016-05-10  1:52 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: David Sterba, btrfs

On Tue, May 10, 2016 at 09:16:04AM +0800, Qu Wenruo wrote:
> In the recent test for new btrfs-convert backward compatibility, I
> found that cmds-fi-du.c uses FIEMAP_EXTENT_SHARED bits, which is not
> present in kernel of old distributions like RHEL6 (Sorry, didn't
> test on openSUSE equivalent).
> 
> Unlike e2fsprogs, we can check its version with pkgconfig, any idea
> to avoid such compiling error?

#ifndef FIEMAP_EXTENT_SHARED
#define FIEMAP_EXTENT_SHARED           0x00002000
#endif

This is what I do in duperemove. Many distributions dind't update their
kernel header packages for that bit so even though it's in the kernel
userspace programs using it won't compile.


> And further more, without kernel support for FIEMAP_EXTENT_SHARED,
> will fi-du work anymore?

RHEL6 says they're using 2.6.32 which is just before the introduction of
SHARED. It couild be that they have it though considering there is an
immense number of backports done for distro kernels. I would honestly check
the source. What we're really looking to see is what version of btrfs they
have.

With the above patch we would compile and run everywhere. If someone runs an
obsolete version of btrfs then fi du won't report any shared extents. This
is unfortunate but so is running btrfs from 2.6.32.
	--Mark

--
Mark Fasheh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Idea on compatibility for old distributions
  2016-05-10  1:52 ` Mark Fasheh
@ 2016-05-10  2:04   ` Qu Wenruo
  0 siblings, 0 replies; 6+ messages in thread
From: Qu Wenruo @ 2016-05-10  2:04 UTC (permalink / raw)
  To: Mark Fasheh; +Cc: David Sterba, btrfs



Mark Fasheh wrote on 2016/05/09 18:52 -0700:
> On Tue, May 10, 2016 at 09:16:04AM +0800, Qu Wenruo wrote:
>> In the recent test for new btrfs-convert backward compatibility, I
>> found that cmds-fi-du.c uses FIEMAP_EXTENT_SHARED bits, which is not
>> present in kernel of old distributions like RHEL6 (Sorry, didn't
>> test on openSUSE equivalent).
>>
>> Unlike e2fsprogs, we can check its version with pkgconfig, any idea
>> to avoid such compiling error?
>
> #ifndef FIEMAP_EXTENT_SHARED
> #define FIEMAP_EXTENT_SHARED           0x00002000
> #endif
>
> This is what I do in duperemove. Many distributions dind't update their
> kernel header packages for that bit so even though it's in the kernel
> userspace programs using it won't compile.

Oh, I just forgot such easy fix. :)
>
>
>> And further more, without kernel support for FIEMAP_EXTENT_SHARED,
>> will fi-du work anymore?
>
> RHEL6 says they're using 2.6.32 which is just before the introduction of
> SHARED. It couild be that they have it though considering there is an
> immense number of backports done for distro kernels. I would honestly check
> the source. What we're really looking to see is what version of btrfs they
> have.
>
> With the above patch we would compile and run everywhere. If someone runs an
> obsolete version of btrfs then fi du won't report any shared extents. This
> is unfortunate but so is running btrfs from 2.6.32.
> 	--Mark

As long as compile passes, it's completely acceptable.

Hopes the patch will be sent out soon.

Thanks,
Qu
>
> --
> Mark Fasheh
>
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Idea on compatibility for old distributions
  2016-05-10  1:16 Idea on compatibility for old distributions Qu Wenruo
  2016-05-10  1:52 ` Mark Fasheh
@ 2016-05-10 20:23 ` Eric Sandeen
       [not found]   ` <15f7b634-f173-d73f-5c17-8d9294f1efd7@cn.fujitsu.com>
  1 sibling, 1 reply; 6+ messages in thread
From: Eric Sandeen @ 2016-05-10 20:23 UTC (permalink / raw)
  To: Qu Wenruo, David Sterba, Mark Fasheh; +Cc: btrfs

On 5/9/16 8:16 PM, Qu Wenruo wrote:
> Hi David, Mark,
> 
> In the recent test for new btrfs-convert backward compatibility, I
> found that cmds-fi-du.c uses FIEMAP_EXTENT_SHARED bits, which is not
> present in kernel of old distributions like RHEL6 (Sorry, didn't test
> on openSUSE equivalent).

There is really no need to invest in compatibility with such old
distros IMHO.  As Phoronix breathlessly points out today, the tech preview
of btrfs in RHEL6 has ended, and it is now deprecated in RHEL6.
RHEL6-era btrfs was an interesting experiment, but it is one that will
not continue.

Thanks,
-Eric

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Idea on compatibility for old distributions
       [not found]     ` <20160512083755.GJ29353@suse.cz>
@ 2016-05-12  8:51       ` Qu Wenruo
  2016-05-12  9:22         ` David Sterba
  0 siblings, 1 reply; 6+ messages in thread
From: Qu Wenruo @ 2016-05-12  8:51 UTC (permalink / raw)
  To: dsterba, Eric Sandeen, MarkFasheh, btrfs

David Sterba wrote on 2016/05/12 10:37 +0200:
> On Thu, May 12, 2016 at 08:57:47AM +0800, Qu Wenruo wrote:
>> Thanks for the info.
>>
>> I also read the phoronix news yesterday.
>> So for RHEL6 that's meaningless.
>>
>> But I'm not sure whether it's still meaningless for OpenSUSE, maybe
>> David has some plan on it?
>
> No plans.
>
>
So the compatible layer patch is just to allow btrfs-progs to be 
compiled on old distros?

Thanks,
Qu

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Idea on compatibility for old distributions
  2016-05-12  8:51       ` Qu Wenruo
@ 2016-05-12  9:22         ` David Sterba
  0 siblings, 0 replies; 6+ messages in thread
From: David Sterba @ 2016-05-12  9:22 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: dsterba, Eric Sandeen, MarkFasheh, btrfs

On Thu, May 12, 2016 at 04:51:22PM +0800, Qu Wenruo wrote:
> David Sterba wrote on 2016/05/12 10:37 +0200:
> > On Thu, May 12, 2016 at 08:57:47AM +0800, Qu Wenruo wrote:
> >> Thanks for the info.
> >>
> >> I also read the phoronix news yesterday.
> >> So for RHEL6 that's meaningless.
> >>
> >> But I'm not sure whether it's still meaningless for OpenSUSE, maybe
> >> David has some plan on it?
> >
> > No plans.
> >
> So the compatible layer patch is just to allow btrfs-progs to be 
> compiled on old distros?

Yes, but convert compatibility is with e2fsprogs while
FIEMAP_EXTENT_SHARED is kernel interface.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-05-12  9:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-10  1:16 Idea on compatibility for old distributions Qu Wenruo
2016-05-10  1:52 ` Mark Fasheh
2016-05-10  2:04   ` Qu Wenruo
2016-05-10 20:23 ` Eric Sandeen
     [not found]   ` <15f7b634-f173-d73f-5c17-8d9294f1efd7@cn.fujitsu.com>
     [not found]     ` <20160512083755.GJ29353@suse.cz>
2016-05-12  8:51       ` Qu Wenruo
2016-05-12  9:22         ` David Sterba

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