mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-20 23:16:28 -05:00
Adds --test-skip-sequential to disable the sequential hint for the disk cache.
This commit is contained in:
parent
a85aa08276
commit
aeb167bb16
13 changed files with 114 additions and 65 deletions
6
sync.c
6
sync.c
|
|
@ -185,7 +185,7 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
|
|||
}
|
||||
}
|
||||
|
||||
ret = handle_open(&handle[j], block_file_get(block), stderr);
|
||||
ret = handle_open(&handle[j], block_file_get(block), stderr, state->skip_sequential);
|
||||
if (ret == -1) {
|
||||
if (errno == ENOENT) {
|
||||
fprintf(stderr, "Missing file '%s'.\n", handle[j].path);
|
||||
|
|
@ -410,7 +410,7 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
|||
|
||||
/* create the file and open for writing */
|
||||
parity_ptr = &parity;
|
||||
ret = parity_create(parity_ptr, state->parity, &out_size);
|
||||
ret = parity_create(parity_ptr, state->parity, &out_size, state->skip_sequential);
|
||||
if (ret == -1) {
|
||||
fprintf(stderr, "WARNING! Without an accessible Parity file, it isn't possible to sync.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
@ -431,7 +431,7 @@ int state_sync(struct snapraid_state* state, block_off_t blockstart, block_off_t
|
|||
|
||||
if (state->level >= 2) {
|
||||
qarity_ptr = &qarity;
|
||||
ret = parity_create(qarity_ptr, state->qarity, &out_size);
|
||||
ret = parity_create(qarity_ptr, state->qarity, &out_size, state->skip_sequential);
|
||||
if (ret == -1) {
|
||||
fprintf(stderr, "WARNING! Without an accessible Q-Parity file, it isn't possible to sync.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue