From c119ca17336727527af67a1fc31322c63e100f63 Mon Sep 17 00:00:00 2001 From: Adam Moody Date: Sun, 31 Jan 2021 16:03:47 -0800 Subject: [PATCH] dcmp, dsync: split on copy_opts chunk size rather than hardcoded value Signed-off-by: Adam Moody --- src/dcmp/dcmp.c | 4 ++-- src/dsync/dsync.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dcmp/dcmp.c b/src/dcmp/dcmp.c index b6c5bcf58..b28c8ecca 100644 --- a/src/dcmp/dcmp.c +++ b/src/dcmp/dcmp.c @@ -783,8 +783,8 @@ static int dcmp_strmap_compare_data( MFU_LOG(MFU_LOG_INFO, "Comparing file contents"); } - /* get chunk size for copying files (just hard-coded for now) */ - uint64_t chunk_size = 1024 * 1024; + /* get chunk size for copying files */ + uint64_t chunk_size = copy_opts->chunk_size; /* get the linked list of file chunks for the src and dest */ mfu_file_chunk* src_head = mfu_file_chunk_list_alloc(src_compare_list, chunk_size); diff --git a/src/dsync/dsync.c b/src/dsync/dsync.c index 18bc31f7d..cfd240d54 100644 --- a/src/dsync/dsync.c +++ b/src/dsync/dsync.c @@ -715,7 +715,7 @@ static void dsync_strmap_compare_data_link_dest( int rc = 0; /* get chunk size for copying files (just hard-coded for now) */ - uint64_t chunk_size = 1024 * 1024; + uint64_t chunk_size = copy_opts->chunk_size; /* get the linked list of file chunks for the src and dest */ mfu_file_chunk* src_head = mfu_file_chunk_list_alloc(src_compare_list, chunk_size); @@ -834,7 +834,7 @@ static int dsync_strmap_compare_data( int rc = 0; /* get chunk size for copying files (just hard-coded for now) */ - uint64_t chunk_size = 1024 * 1024; + uint64_t chunk_size = copy_opts->chunk_size; /* get the linked list of file chunks for the src and dest */ mfu_file_chunk* src_head = mfu_file_chunk_list_alloc(src_compare_list, chunk_size);