Use msync rather than fsync to flush the entire disc

This involves storing the size of the mapped disc in the client struct,
and then supplying that to the msync command.
This commit is contained in:
Patrick J Cherry
2018-02-05 17:01:32 +00:00
parent ad2014ac9d
commit afa1bb0efb
2 changed files with 5 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
#include <signal.h>
#include <time.h>
#include <inttypes.h>
/** CLIENT_HANDLER_TIMEOUT
* This is the length of time (in seconds) any request can be outstanding for.
@@ -31,6 +32,8 @@ struct client {
int fileno;
char* mapped;
uint64_t mapped_size;
struct self_pipe * stop_signal;
struct server* serve; /* FIXME: remove above duplication */