From: Jie Liu Date: Fri, 11 Jun 2010 08:29:02 +0000 (+0800) Subject: copy.c: add FIEMAP_FLAG_SYNC to fiemap ioctl X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=98b2a24d7f00fba786a81870c9c9c8ffb9b8f9cf;p=thirdparty%2Fcoreutils.git copy.c: add FIEMAP_FLAG_SYNC to fiemap ioctl * src/copy.c (fiemap_copy): Force kernel to sync the source file before mapping. --- diff --git a/src/copy.c b/src/copy.c index f149be460f..f48c74df73 100644 --- a/src/copy.c +++ b/src/copy.c @@ -191,6 +191,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