Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
9fc1e1b1
Commit
9fc1e1b1
authored
Sep 15, 2011
by
antirez
Browse files
REDIS_BIO_AOF_FSYNC implemented
parent
b39a4d0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bio.c
View file @
9fc1e1b1
...
@@ -129,6 +129,8 @@ void *bioProcessBackgroundJobs(void *arg) {
...
@@ -129,6 +129,8 @@ void *bioProcessBackgroundJobs(void *arg) {
/* Process the job accordingly to its type. */
/* Process the job accordingly to its type. */
if
(
type
==
REDIS_BIO_CLOSE_FILE
)
{
if
(
type
==
REDIS_BIO_CLOSE_FILE
)
{
close
((
long
)
job
->
arg1
);
close
((
long
)
job
->
arg1
);
}
else
if
(
type
==
REDIS_BIO_AOF_FSYNC
)
{
fsync
((
long
)
job
->
arg1
);
}
else
{
}
else
{
redisPanic
(
"Wrong job type in bioProcessBackgroundJobs()."
);
redisPanic
(
"Wrong job type in bioProcessBackgroundJobs()."
);
}
}
...
...
src/bio.h
View file @
9fc1e1b1
...
@@ -7,4 +7,5 @@ time_t bioOlderJobOfType(int type);
...
@@ -7,4 +7,5 @@ time_t bioOlderJobOfType(int type);
/* Background job opcodes */
/* Background job opcodes */
#define REDIS_BIO_CLOSE_FILE 0
/* Deferred close(2) syscall. */
#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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment