diff options
author | Susan LoVerso <sue@wiredtiger.com> | 2014-11-05 13:28:48 -0500 |
---|---|---|
committer | Susan LoVerso <sue@wiredtiger.com> | 2014-11-05 13:28:48 -0500 |
commit | 93ee96ff8ff58537ee51935331652030bc3672f4 (patch) | |
tree | 77642be1ca56fd7d0f7a76cdb9488346f4fae3f4 /src/os_posix/os_open.c | |
parent | ceac6fd557ac4d46e30a495d4124056c881eaa0f (diff) | |
download | mongo-93ee96ff8ff58537ee51935331652030bc3672f4.tar.gz |
Let logging manage syncing the directory itself #1343
Diffstat (limited to 'src/os_posix/os_open.c')
-rw-r--r-- | src/os_posix/os_open.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/os_posix/os_open.c b/src/os_posix/os_open.c index aebf01e1c0f..5c85bc4cf19 100644 --- a/src/os_posix/os_open.c +++ b/src/os_posix/os_open.c @@ -8,11 +8,11 @@ #include "wt_internal.h" /* - * __open_directory_sync -- + * __wt_directory_sync -- * Fsync the directory in which we created the file. */ -static int -__open_directory_sync(WT_SESSION_IMPL *session, char *path) +int +__wt_directory_sync(WT_SESSION_IMPL *session, char *path) { #ifdef __linux__ WT_DECL_RET; @@ -167,12 +167,10 @@ __wt_open(WT_SESSION_IMPL *session, /* * If this is a file we are syncing, some filesystems require that we * sync the directory to be confident that the file will appear. + * NOTE: Logging manages its own sync of the directory. */ - if ((dio_type == WT_FILE_TYPE_DATA && - F_ISSET(conn, WT_CONN_CKPT_SYNC)) || - (dio_type == WT_FILE_TYPE_LOG && - FLD_ISSET(conn->txn_logsync, WT_LOG_FLUSH))) - WT_ERR(__open_directory_sync(session, path)); + if (dio_type == WT_FILE_TYPE_DATA && F_ISSET(conn, WT_CONN_CKPT_SYNC)) + WT_ERR(__wt_directory_sync(session, path)); WT_ERR(__wt_calloc(session, 1, sizeof(WT_FH), &fh)); WT_ERR(__wt_strdup(session, name, &fh->name)); |