copy: use FIEMAP (extent_copy) only for apparently-sparse files,
commit18a474d755aa10d881243d9457d2c420c5e4ea77
authorJim Meyering <meyering@redhat.com>
Wed, 20 Apr 2011 09:21:09 +0000 (20 11:21 +0200)
committerJim Meyering <meyering@redhat.com>
Wed, 20 Apr 2011 16:48:48 +0000 (20 18:48 +0200)
tree4df68a02135e49569c3287ca0e25b886d9ba9732
parent846d826096fc8fb621d751f8b3db1da68a8bbd06
copy: use FIEMAP (extent_copy) only for apparently-sparse files,

to avoid the expense of extent_copy's unconditional use of
FIEMAP_FLAG_SYNC.
* src/copy.c (copy_reg): Do not attempt extent_copy on a file
that appears to have no holes.
* NEWS (Changes in behavior): Document this.  At first I labeled this
as a bug fix, but that would be inaccurate, considering there is no
documentation of FIEMAP semantics, nor even consensus among kernel
FS developers.  Here's hoping SEEK_HOLE/SEEK_DATA support will soon
make it into the linux kernel.
NEWS
src/copy.c