coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/3] copy: Check if SPARSE_ALWAYS is set while performing extent_


From: Goldwyn Rodrigues
Subject: [PATCH 1/3] copy: Check if SPARSE_ALWAYS is set while performing extent_copy
Date: Thu, 31 May 2018 15:42:41 -0500

From: Goldwyn Rodrigues <address@hidden>

Currently, it always attempts to punch holes in files while copying. It
should be making holes only when it is specifically requested.

Signed-off-by: Goldwyn Rodrigues <address@hidden>
---
 src/copy.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/copy.c b/src/copy.c
index 4998c83e6..f9621495d 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -521,7 +521,8 @@ extent_copy (int src_fd, int dest_fd, char *buf, size_t 
buf_size,
 
               if ( ! sparse_copy (src_fd, dest_fd, buf, buf_size,
                                   sparse_mode == SPARSE_ALWAYS ? hole_size: 0,
-                                  true, src_name, dst_name, ext_len, &n_read,
+                                  sparse_mode == SPARSE_ALWAYS, src_name,
+                                 dst_name, ext_len, &n_read,
                                   &read_hole))
                 goto fail;
 
-- 
2.16.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]