aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJie Liu <jeff.liu@oracle.com>2010-06-11 16:29:02 +0800
committerJim Meyering <meyering@redhat.com>2011-01-28 23:28:38 +0100
commita782b73226406e058d73ef9be093c6b27f776f25 (patch)
tree637f698bd13a40c8b36e1927e1e72512f6dca727
parenttests: accommodate varying filefrag -v "flags" output (diff)
downloadcoreutils-a782b73226406e058d73ef9be093c6b27f776f25.tar.gz
coreutils-a782b73226406e058d73ef9be093c6b27f776f25.zip
copy.c: add FIEMAP_FLAG_SYNC to fiemap ioctl
* src/copy.c (fiemap_copy): Force kernel to sync the source file before mapping.
-rw-r--r--src/copy.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/copy.c b/src/copy.c
index 1d32913eb..ead15b82f 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -190,6 +190,7 @@ fiemap_copy (int src_fd, int dest_fd, size_t buf_size,
do
{
fiemap->fm_length = FIEMAP_MAX_OFFSET;
+ fiemap->fm_flags = FIEMAP_FLAG_SYNC;
fiemap->fm_extent_count = count;
/* When ioctl(2) fails, fall back to the normal copy only if it