Skip to content

Commit

Permalink
dcmp, dsync: split on copy_opts chunk size rather than hardcoded value
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Moody <moody20@llnl.gov>
  • Loading branch information
adammoody committed Feb 1, 2021
1 parent e2d5e25 commit c119ca1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/dcmp/dcmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/dsync/dsync.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c119ca1

Please sign in to comment.