bug#6131: [PATCH]: fiemap support for efficient sparse file copy

2010-05-21 Thread jeff.liu
Hi Jim, This is the revised version, it fixed the fiemap-start offset calculation approach to remove it out of the 'for (i = 0; i < fiemap->fm_mapped_extents; i++)' loop. I have not got a 64bits machine for the testing at the moment, at the following, the first case only run againt x86 with val

bug#6131: [PATCH]: fiemap support for efficient sparse file copy

2010-05-21 Thread jeff.liu
Jim Meyering wrote: > jeff.liu wrote: > ... >>> [*] I tried to count syscalls with strace but got a segfault. >>> Using valgrind I get errors, so debugged enough to get a clean >>> run, but possibly at the expense of correctness. We'll need more >>> tests to ensure that the non-sparse blocks in th

bug#6131: [PATCH]: fiemap support for efficient sparse file copy

2010-05-21 Thread Jim Meyering
jeff.liu wrote: ... > Sorry for the lack of detailed info for this point, except for removing the > fiemap->fm_start from > the loop, I need to remove "fiemap->fm_start = (fm_ext[i-1].fe_logical + > fm_ext[i-1].fe_length);" > out of the 'for (i = 0; i < fiemap->fm_mapped_extents; i++)" as well. >

bug#6131: [PATCH]: fiemap support for efficient sparse file copy

2010-05-21 Thread jeff.liu
Jim Meyering wrote: > jeff.liu wrote: > ... Subject: [PATCH 1/1] tests: add a new test for FIEMAP-copy * tests/cp/sparse-fiemap: Add a new test for FIEMAP-copy against a loopbacked ext4 partition. * tests/Makefile.am (sparse-fiemap): Reference the new test. > > BTW, I've j

bug#6131: [PATCH]: fiemap support for efficient sparse file copy

2010-05-21 Thread Jim Meyering
jeff.liu wrote: ... >>> Subject: [PATCH 1/1] tests: add a new test for FIEMAP-copy >>> >>> * tests/cp/sparse-fiemap: Add a new test for FIEMAP-copy against a >>> loopbacked ext4 partition. >>> * tests/Makefile.am (sparse-fiemap): Reference the new test. BTW, I've just made this additional change t

bug#6131: [PATCH]: fiemap support for efficient sparse file copy

2010-05-21 Thread Jim Meyering
jeff.liu wrote: ... >> [*] I tried to count syscalls with strace but got a segfault. >> Using valgrind I get errors, so debugged enough to get a clean >> run, but possibly at the expense of correctness. We'll need more >> tests to ensure that the non-sparse blocks in the copy all have >> the same

bug#6236: Bug report in Date Command

2010-05-21 Thread Eric Blake
On 05/20/2010 08:07 PM, lijian 65631 wrote: > Dear David, This is a mailing list frequented by lots of readers. I'm not David, but I can reply. > > When I input the comman 'date "+%Y%m%d" -d "1986-05-04 1 day"' to get the > next day of '1986-05-04', I get the result as below. > > Maybe it is a

bug#6131: [PATCH]: fiemap support for efficient sparse file copy

2010-05-21 Thread Pádraig Brady
On 21/05/10 13:59, Jim Meyering wrote: > Pádraig Brady wrote: >> There is the unlikely combination of ext4 without fiemap support I think? >> If so then that dependency is worth a comment. > > I don't know off hand. > Is there a shell-level way to test for that? One could check if is available,

bug#6131: [PATCH]: fiemap support for efficient sparse file copy

2010-05-21 Thread jeff.liu
Jim Meyering wrote: > jeff.liu wrote: >> Hi Jim, >> >> Thanks for your kind advise! >> >> I'd like to adopt the timeout(1) approach for the test work. >> >> My thought is: >> 1. Create and mount a file-backed ext4 partition rather than relying on the >> HARD CODE path. >> 2. Create a 2gb sparse fi

bug#6131: [PATCH]: fiemap support for efficient sparse file copy

2010-05-21 Thread Jim Meyering
Pádraig Brady wrote: > On 13/05/10 15:25, jeff.liu wrote: >> >> diff --git a/src/copy.c b/src/copy.c >> index c16cef6..960e5fb 100644 >> --- a/src/copy.c >> +++ b/src/copy.c >> @@ -63,6 +63,10 @@ >> >> #include >> >> +#ifndef HAVE_FIEMAP >> +# include "fiemap.h" >> +#endif > > Is HAVE_FIEMAP ever

bug#6131: [PATCH]: fiemap support for efficient sparse file copy

2010-05-21 Thread Pádraig Brady
On 13/05/10 15:25, jeff.liu wrote: > > diff --git a/src/copy.c b/src/copy.c > index c16cef6..960e5fb 100644 > --- a/src/copy.c > +++ b/src/copy.c > @@ -63,6 +63,10 @@ > > #include > > +#ifndef HAVE_FIEMAP > +# include "fiemap.h" > +#endif Is HAVE_FIEMAP ever defined anywhere? In future will we u