Re: [PATCH] copy: adjust fiemap handling of sparse files

2011-03-18 Thread Pádraig Brady
On 18/03/11 13:19, Pádraig Brady wrote: > Bah humbug. Looks like there is no such issue. > This actually seems like an issue in a coreutils test script, > which made it seem like the SYNC done by `filefrag -vs` was ineffective. Proposed fix attached. My perl is still weak, so I won't apply until s

Re: [PATCH] copy: adjust fiemap handling of sparse files

2011-03-18 Thread Jim Meyering
Eric Sandeen wrote: ... > The testcase in coreutils should definitely remove the fdatasync > hack, as that just makes the test pass without worrying about things > in the real world. :) A better test suite might be to generate > random holey / delalloc files and copy those around. > > We should w

Re: [PATCH] copy: adjust fiemap handling of sparse files

2011-03-18 Thread Eric Sandeen
On 3/18/11 8:48 AM, Chris Mason wrote: ... > Btrfs before 2.6.38 may have real trouble though, even with the sync. > We were returning overlapping ranges to you, so the destination would > end up bigger than the original. This could be fixed in cp by making > sure to never seek backwards based

Re: [PATCH] copy: adjust fiemap handling of sparse files

2011-03-18 Thread Jim Meyering
Pádraig Brady wrote: ... > OK thanks for the info. So: > > XFS may miss some extents for sparse files before 2.6.36 > BTRFS and EXT4 need a sync before fiemap() before 2.6.38 > BTRFS can return overlapping extents before 2.6.38 > > It seems like we should at least detect overlapping extents in our:

Re: [PATCH] copy: adjust fiemap handling of sparse files

2011-03-18 Thread Pádraig Brady
On 18/03/11 13:48, Chris Mason wrote: > Excerpts from Pádraig Brady's message of 2011-03-18 09:19:44 -0400: >> On 18/03/11 12:04, Chris Mason wrote: >>> Excerpts from Jim Meyering's message of 2011-03-18 07:52:43 -0400: Pádraig Brady wrote: > > So am I right in thinking FIEMAP_FLAG_SYN

Re: [PATCH] copy: adjust fiemap handling of sparse files

2011-03-18 Thread Chris Mason
Excerpts from Pádraig Brady's message of 2011-03-18 09:19:44 -0400: > On 18/03/11 12:04, Chris Mason wrote: > > Excerpts from Jim Meyering's message of 2011-03-18 07:52:43 -0400: > >> Pádraig Brady wrote: > >>> I also now remember this discussion: > >>> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=

Re: [PATCH] copy: adjust fiemap handling of sparse files

2011-03-18 Thread Pádraig Brady
On 18/03/11 12:04, Chris Mason wrote: > Excerpts from Jim Meyering's message of 2011-03-18 07:52:43 -0400: >> Pádraig Brady wrote: >>> On 17/03/11 23:00, Pádraig Brady wrote: On 17/03/11 19:29, Mike Frysinger wrote: > On Thursday, March 17, 2011 05:32:33 Pádraig Brady wrote: >> This is

Re: [PATCH] copy: adjust fiemap handling of sparse files

2011-03-18 Thread Chris Mason
Excerpts from Jim Meyering's message of 2011-03-18 07:52:43 -0400: > Pádraig Brady wrote: > > On 17/03/11 23:00, Pádraig Brady wrote: > >> On 17/03/11 19:29, Mike Frysinger wrote: > >>> On Thursday, March 17, 2011 05:32:33 Pádraig Brady wrote: > This is the kind of patch appropriate for a dist

Re: [PATCH] copy: adjust fiemap handling of sparse files

2011-03-18 Thread Jim Meyering
Pádraig Brady wrote: > On 17/03/11 23:00, Pádraig Brady wrote: >> On 17/03/11 19:29, Mike Frysinger wrote: >>> On Thursday, March 17, 2011 05:32:33 Pádraig Brady wrote: This is the kind of patch appropriate for a distro, as they may or may not have a fix backported to their kernel. >>> >>

Re: [PATCH] copy: adjust fiemap handling of sparse files

2011-03-18 Thread Pádraig Brady
On 17/03/11 23:00, Pádraig Brady wrote: > On 17/03/11 19:29, Mike Frysinger wrote: >> On Thursday, March 17, 2011 05:32:33 Pádraig Brady wrote: >>> This is the kind of patch appropriate for a distro, >>> as they may or may not have a fix backported to their kernel. >> >> Gentoo, being a source dist