copy: process empty extents more efficiently
authorPádraig Brady <P@draigBrady.com>
Fri, 11 Feb 2011 08:55:22 +0000 (08:55 +0000)
committerPádraig Brady <P@draigBrady.com>
Fri, 1 Apr 2011 14:04:18 +0000 (15:04 +0100)
commitbfdb6b585b6842362977b8c10fe7858fb96a1dd0
tree0279e6e1674d34072ba8e7bf94ba929f332e54e4
parentb56b53bd70b1f8fa2b5a95d4569bb72a2419b5cd
copy: process empty extents more efficiently

* src/copy.c (extent_copy): Treat an allocated but empty extent
much like a hole.  I.E. don't read data we know is going to be NUL.
Also we convert the empty extent to a hole only when SPARSE_ALWAYS
so that the source and dest have the same allocation.  This will
be improved soon, when we use fallocate() to do the allocation.
* tests/cp/fiemap-empty: A new test for efficiency and correctness
of copying empty extents.
* tests/Makefile.am: Reference the new test.
* NEWS: Mention the change in behavior.
NEWS
src/copy.c
tests/Makefile.am
tests/cp/fiemap-empty [new file with mode: 0755]