summaryrefslogtreecommitdiff
path: root/src/copy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/copy.c')
-rw-r--r--src/copy.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/copy.c b/src/copy.c
index b309a8643..30c1b564f 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -204,11 +204,11 @@ extent_copy (int src_fd, int dest_fd, size_t buf_size,
uint64_t last_ext_len = 0;
uint64_t last_read_size = 0;
- open_extent_scan (src_fd, &scan);
+ extent_scan_init (src_fd, &scan);
do
{
- bool ok = get_extents_info (&scan);
+ bool ok = extent_scan_read (&scan);
if (! ok)
{
if (scan.hit_final_extent)
@@ -216,7 +216,6 @@ extent_copy (int src_fd, int dest_fd, size_t buf_size,
if (scan.initial_scan_failed)
{
- close_extent_scan (&scan);
*require_normal_copy = true;
return false;
}
@@ -304,11 +303,10 @@ extent_copy (int src_fd, int dest_fd, size_t buf_size,
}
/* Release the space allocated to scan->ext_info. */
- free_extents_info (&scan);
- } while (! scan.hit_final_extent);
+ extent_scan_free (&scan);
- /* Do nothing now. */
- close_extent_scan (&scan);
+ }
+ while (! scan.hit_final_extent);
/* If a file ends up with holes, the sum of the last extent logical offset
and the read-returned size or the last extent length will be shorter than