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
3bb225d6
Commit
3bb225d6
authored
Apr 21, 2010
by
antirez
Browse files
Revert "fsync always now uses O_DIRECT on Linux"
This reverts commit
566c3c7a
.
parent
d6fb4d53
Changes
2
Hide whitespace changes
Inline
Side-by-side
config.h
View file @
3bb225d6
...
...
@@ -35,9 +35,4 @@
#define HAVE_KQUEUE 1
#endif
/* test for O_DIRECT */
#ifdef __linux__
#define HAVE_O_DIRECT 1
#endif
#endif
redis.c
View file @
3bb225d6
...
...
@@ -1673,16 +1673,7 @@ static void initServer() {
acceptHandler
,
NULL
)
==
AE_ERR
)
oom
(
"creating file event"
);
if
(
server
.
appendonly
)
{
int
flags
=
O_WRONLY
|
O_APPEND
|
O_CREAT
;
#ifdef HAVE_O_DIRECT
if
(
server
.
appendfsync
==
APPENDFSYNC_ALWAYS
)
{
flags
|=
O_DIRECT
;
server
.
appendfsync
=
APPENDFSYNC_NO
;
}
#endif
server
.
appendfd
=
open
(
server
.
appendfilename
,
flags
,
0644
);
server
.
appendfd
=
open
(
server
.
appendfilename
,
O_WRONLY
|
O_APPEND
|
O_CREAT
,
0644
);
if
(
server
.
appendfd
==
-
1
)
{
redisLog
(
REDIS_WARNING
,
"Can't open the append-only file: %s"
,
strerror
(
errno
));
...
...
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