summaryrefslogtreecommitdiff
path: root/tests/cp
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2011-03-30 22:50:05 +0100
committerPádraig Brady <P@draigBrady.com>2011-03-31 16:46:42 +0100
commitf69876e558782eb770955aa0b1344a5a8262548b (patch)
tree57d7c29f644b72239a92e0108408955ae29de39f /tests/cp
parent17a7e4592727b44d0a5550d1340e354786109af7 (diff)
downloadcoreutils-f69876e558782eb770955aa0b1344a5a8262548b.tar.xz
copy: with fiemap copy, only sync when needed
* src/extent-scan.h (struct extent_scan): Add the fm_flags member to pass to the fiemap scan. * src/extent-scan.c (extent_need_sync): A new function used to detect Linux kernels before 2.6.38. (extent_scan_init): Add FIEMAP_FLAG_SYNC when needed. * tests/cp/sparse-fiemap: Adjust comment. * NEWS: Mention the change in behavior. Indirectly suggested by Mike Frysinger
Diffstat (limited to 'tests/cp')
-rwxr-xr-xtests/cp/sparse-fiemap4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/cp/sparse-fiemap b/tests/cp/sparse-fiemap
index 73448ecfa..bac289093 100755
--- a/tests/cp/sparse-fiemap
+++ b/tests/cp/sparse-fiemap
@@ -69,8 +69,8 @@ for i in $(seq 1 2 21); do
-e 'for (1..'$j') { sysseek (*F, $n, 1)' \
-e '&& syswrite (*F, chr($_)x$n) or die "$!"}' > j1 || fail=1
- # Note there is an implicit sync performed by cp to
- # work around bugs in EXT4 and BTRFS before Linux 2.6.38
+ # Note there is an implicit sync performed by cp on Linux kernels
+ # before 2.6.38 to work around bugs in EXT4 and BTRFS.
# Note also the -s parameter to the filefrag commands below
# for the same reasons.
cp --sparse=always j1 j2 || fail=1