Change the default advise mode to 'flush'

This is expected to fix the problem reported in the
Forum about slow write due the big amount of RAM
that delay the write for a long time.
This commit is contained in:
Andrea Mazzoleni 2016-05-17 23:37:07 +02:00
parent 397c58c41e
commit f5d1afaaed
2 changed files with 2 additions and 1 deletions

View file

@ -21,6 +21,7 @@ SnapRAID HISTORY
--test-io-advise-discard discard cache after every operation (Linux)
--test-io-advise-discard-window discard cache every 8 MB (Linux)
--test-io-advise-direct use direct/unbuffered mode (Linux/Windows)
The default mode is 'flush' in Linux and 'sequential' in Windows.
* Fixed running in Windows platforms that miss the RtlGenRandom
function.
* Added a new 'hashsize' configuration option. It could be useful in

View file

@ -537,7 +537,7 @@ void state_config(struct snapraid_state* state, const char* path, const char* co
state->file_mode = state->opt.file_mode;
} else {
/* default mode, if nothing is specified */
state->file_mode = ADVISE_SEQUENTIAL;
state->file_mode = ADVISE_FLUSH;
}
/* store current command */