From f5d1afaaed1f230bd4627fb58a36a28e54f7be2b Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Tue, 17 May 2016 23:37:07 +0200 Subject: [PATCH] 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. --- HISTORY | 1 + cmdline/state.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index 2e7d906b..681028a8 100644 --- a/HISTORY +++ b/HISTORY @@ -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 diff --git a/cmdline/state.c b/cmdline/state.c index 102cc31d..b091cffb 100644 --- a/cmdline/state.c +++ b/cmdline/state.c @@ -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 */