mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-21 07:26:29 -05:00
Add the option --test-skip-multi-scan to skip multithreads scan
This commit is contained in:
parent
7948d3d3de
commit
1d4fbd3f9a
3 changed files with 14 additions and 2 deletions
|
|
@ -1626,7 +1626,10 @@ static int state_diffscan(struct snapraid_state* state, int is_diff)
|
|||
for (i = scanlist; i != 0; i = i->next) {
|
||||
struct snapraid_scan* scan = i->data;
|
||||
#if HAVE_THREAD
|
||||
thread_create(&scan->thread, scan_disk, scan);
|
||||
if (state->opt.skip_multi_scan)
|
||||
scan_disk(scan);
|
||||
else
|
||||
thread_create(&scan->thread, scan_disk, scan);
|
||||
#else
|
||||
scan_disk(scan);
|
||||
#endif
|
||||
|
|
@ -1639,7 +1642,8 @@ static int state_diffscan(struct snapraid_state* state, int is_diff)
|
|||
void* retval;
|
||||
|
||||
/* wait for thread termination */
|
||||
thread_join(scan->thread, &retval);
|
||||
if (!state->opt.skip_multi_scan)
|
||||
thread_join(scan->thread, &retval);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue