Permalink
Browse files

REDIS_BIO_AOF_FSYNC implemented

  • Loading branch information...
1 parent 0807f5b commit 3ae56d845859428dba9130d982bea1d8e72798a9 @antirez committed Sep 15, 2011
Showing with 4 additions and 1 deletion.
  1. +2 −0 src/bio.c
  2. +2 −1 src/bio.h
View
@@ -129,6 +129,8 @@ void *bioProcessBackgroundJobs(void *arg) {
/* Process the job accordingly to its type. */
if (type == REDIS_BIO_CLOSE_FILE) {
close((long)job->arg1);
+ } else if (type == REDIS_BIO_AOF_FSYNC) {
+ fsync((long)job->arg1);
} else {
redisPanic("Wrong job type in bioProcessBackgroundJobs().");
}
View
@@ -7,4 +7,5 @@ time_t bioOlderJobOfType(int type);
/* Background job opcodes */
#define REDIS_BIO_CLOSE_FILE 0 /* Deferred close(2) syscall. */
-#define REDIS_BIO_NUM_OPS 1
+#define REDIS_BIO_AOF_FSYNC 1 /* Deferred AOF fsync. */
+#define REDIS_BIO_NUM_OPS 2

0 comments on commit 3ae56d8

Please sign in to comment.