mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-03 21:30:14 -05:00
Print progress message after saving content files when multithreading is disabled
This commit is contained in:
parent
f902527a56
commit
08863cd740
1 changed files with 16 additions and 0 deletions
|
|
@ -4535,6 +4535,9 @@ static void state_write_content(struct snapraid_state* state, uint32_t* out_crc)
|
||||||
block_off_t count_rehash;
|
block_off_t count_rehash;
|
||||||
block_off_t count_unsynced;
|
block_off_t count_unsynced;
|
||||||
block_off_t count_unscrubbed;
|
block_off_t count_unscrubbed;
|
||||||
|
#if !HAVE_MT_WRITE
|
||||||
|
uint64_t start;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* blocks of all array */
|
/* blocks of all array */
|
||||||
blockmax = parity_allocated_size(state);
|
blockmax = parity_allocated_size(state);
|
||||||
|
|
@ -4642,6 +4645,10 @@ static void state_write_content(struct snapraid_state* state, uint32_t* out_crc)
|
||||||
|
|
||||||
fs_single_thread(state, 0);
|
fs_single_thread(state, 0);
|
||||||
|
|
||||||
|
#if !HAVE_MT_WRITE
|
||||||
|
start = os_tick_ms();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAVE_MT_WRITE
|
#if HAVE_MT_WRITE
|
||||||
/* start all writing threads */
|
/* start all writing threads */
|
||||||
first = 1;
|
first = 1;
|
||||||
|
|
@ -4922,6 +4929,15 @@ static void state_write_content(struct snapraid_state* state, uint32_t* out_crc)
|
||||||
/* LCOV_EXCL_STOP */
|
/* LCOV_EXCL_STOP */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
i = tommy_list_head(&state->contentlist);
|
||||||
|
while (i) {
|
||||||
|
struct snapraid_content* content = i->data;
|
||||||
|
|
||||||
|
msg_progress("Saved %s in %" PRIu64 " seconds\n", content->content, (os_tick_ms() - start) / 1000);
|
||||||
|
|
||||||
|
i = i->next;
|
||||||
|
}
|
||||||
|
|
||||||
crc = context->crc;
|
crc = context->crc;
|
||||||
count_file = context->count_file;
|
count_file = context->count_file;
|
||||||
count_hardlink = context->count_hardlink;
|
count_hardlink = context->count_hardlink;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue