From a782b73226406e058d73ef9be093c6b27f776f25 Mon Sep 17 00:00:00 2001 From: Jie Liu Date: Fri, 11 Jun 2010 16:29:02 +0800 Subject: [PATCH] copy.c: add FIEMAP_FLAG_SYNC to fiemap ioctl * src/copy.c (fiemap_copy): Force kernel to sync the source file before mapping. --- src/copy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/copy.c b/src/copy.c index 1d32913ebc..ead15b82f1 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 -- 2.47.2