diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/misc.i | 2 | ||||
-rw-r--r-- | src/include/os.h | 4 | ||||
-rw-r--r-- | src/os_posix/os_fs.c | 2 | ||||
-rw-r--r-- | src/os_win/os_fs.c | 2 |
4 files changed, 6 insertions, 4 deletions
diff --git a/src/include/misc.i b/src/include/misc.i index a96ce405c89..114b711ac88 100644 --- a/src/include/misc.i +++ b/src/include/misc.i @@ -273,8 +273,6 @@ __wt_filesize(WT_SESSION_IMPL *session, WT_FH *fh, wt_off_t *sizep) static inline int __wt_fsync(WT_SESSION_IMPL *session, WT_FH *fh, bool block) { - WT_ASSERT(session, !F_ISSET(S2C(session), WT_CONN_READONLY)); - WT_RET(__wt_verbose( session, WT_VERB_HANDLEOPS, "%s: handle-sync", fh->name)); diff --git a/src/include/os.h b/src/include/os.h index af550b218b8..905f43c305e 100644 --- a/src/include/os.h +++ b/src/include/os.h @@ -60,8 +60,8 @@ /* * The underlying OS calls return ENOTSUP if posix_fadvise functionality isn't - * available, but the WiredTiger code uses the the POSIX flag names in the API. - * Use two values so the underlying code can distinguish. + * available, but WiredTiger uses the POSIX flag names in the API. Use distinct + * values so the underlying code can distinguish. */ #ifndef POSIX_FADV_DONTNEED #define POSIX_FADV_DONTNEED 0x01 diff --git a/src/os_posix/os_fs.c b/src/os_posix/os_fs.c index 7d3049f6c2d..86aa8db8f4f 100644 --- a/src/os_posix/os_fs.c +++ b/src/os_posix/os_fs.c @@ -18,6 +18,8 @@ __posix_sync(WT_SESSION_IMPL *session, { WT_DECL_RET; + WT_ASSERT(session, !F_ISSET(S2C(session), WT_CONN_READONLY)); + #ifdef HAVE_SYNC_FILE_RANGE if (!block) { WT_SYSCALL_RETRY(sync_file_range(fd, diff --git a/src/os_win/os_fs.c b/src/os_win/os_fs.c index 7f2c797dbe4..462773cb9fb 100644 --- a/src/os_win/os_fs.c +++ b/src/os_win/os_fs.c @@ -395,6 +395,8 @@ __win_handle_sync(WT_SESSION_IMPL *session, WT_FH *fh, bool block) { WT_DECL_RET; + WT_ASSERT(session, !F_ISSET(S2C(session), WT_CONN_READONLY)); + /* * We don't open Windows system handles when opening directories * for flushing, as it is not necessary (or possible) to flush |