summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/include/os_fs_inline.h
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2021-05-07 12:24:29 +1000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-05-07 02:50:19 +0000
commit58817e04308cbea4aa7627005cb5aaadd32c89fe (patch)
treefdb9352b858fe8f93baa22fccf7541ed7cf50142 /src/third_party/wiredtiger/src/include/os_fs_inline.h
parentbf895e6c5d415e1687bfd879e073b231cd2200e8 (diff)
downloadmongo-58817e04308cbea4aa7627005cb5aaadd32c89fe.tar.gz
Import wiredtiger: 3a5a0b5e0c09af6906c0d539a1547bb73e2cc142 from branch mongodb-5.0
ref: 073ad6d27f..3a5a0b5e0c for: 5.0.0 WT-7346 Connect new API changes to local storage extension
Diffstat (limited to 'src/third_party/wiredtiger/src/include/os_fs_inline.h')
-rw-r--r--src/third_party/wiredtiger/src/include/os_fs_inline.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/third_party/wiredtiger/src/include/os_fs_inline.h b/src/third_party/wiredtiger/src/include/os_fs_inline.h
index 56d0bc2a5f3..2276f096312 100644
--- a/src/third_party/wiredtiger/src/include/os_fs_inline.h
+++ b/src/third_party/wiredtiger/src/include/os_fs_inline.h
@@ -7,6 +7,16 @@
*/
/*
+ * __wt_fs_file_system --
+ * Get the active file system handle.
+ */
+static inline WT_FILE_SYSTEM *
+__wt_fs_file_system(WT_SESSION_IMPL *session)
+{
+ return (S2FS(session));
+}
+
+/*
* __wt_fs_directory_list --
* Return a list of files from a directory.
*/
@@ -27,7 +37,7 @@ __wt_fs_directory_list(
WT_RET(__wt_filename(session, dir, &path));
- file_system = S2C(session)->file_system;
+ file_system = __wt_fs_file_system(session);
wt_session = (WT_SESSION *)session;
ret = file_system->fs_directory_list(file_system, wt_session, path, prefix, dirlistp, countp);
@@ -56,7 +66,7 @@ __wt_fs_directory_list_single(
WT_RET(__wt_filename(session, dir, &path));
- file_system = S2C(session)->file_system;
+ file_system = __wt_fs_file_system(session);
wt_session = (WT_SESSION *)session;
ret = file_system->fs_directory_list_single(
file_system, wt_session, path, prefix, dirlistp, countp);
@@ -77,7 +87,7 @@ __wt_fs_directory_list_free(WT_SESSION_IMPL *session, char ***dirlistp, u_int co
WT_SESSION *wt_session;
if (*dirlistp != NULL) {
- file_system = S2C(session)->file_system;
+ file_system = __wt_fs_file_system(session);
wt_session = (WT_SESSION *)session;
ret = file_system->fs_directory_list_free(file_system, wt_session, *dirlistp, count);
}
@@ -102,7 +112,7 @@ __wt_fs_exist(WT_SESSION_IMPL *session, const char *name, bool *existp)
WT_RET(__wt_filename(session, name, &path));
- file_system = S2C(session)->file_system;
+ file_system = __wt_fs_file_system(session);
wt_session = (WT_SESSION *)session;
ret = file_system->fs_exist(file_system, wt_session, path, existp);
@@ -137,7 +147,7 @@ __wt_fs_remove(WT_SESSION_IMPL *session, const char *name, bool durable)
WT_RET(__wt_filename(session, name, &path));
- file_system = S2C(session)->file_system;
+ file_system = __wt_fs_file_system(session);
wt_session = (WT_SESSION *)session;
ret = file_system->fs_remove(file_system, wt_session, path, durable ? WT_FS_DURABLE : 0);
@@ -176,7 +186,7 @@ __wt_fs_rename(WT_SESSION_IMPL *session, const char *from, const char *to, bool
WT_ERR(__wt_filename(session, from, &from_path));
WT_ERR(__wt_filename(session, to, &to_path));
- file_system = S2C(session)->file_system;
+ file_system = __wt_fs_file_system(session);
wt_session = (WT_SESSION *)session;
ret = file_system->fs_rename(
file_system, wt_session, from_path, to_path, durable ? WT_FS_DURABLE : 0);
@@ -203,7 +213,7 @@ __wt_fs_size(WT_SESSION_IMPL *session, const char *name, wt_off_t *sizep)
WT_RET(__wt_filename(session, name, &path));
- file_system = S2C(session)->file_system;
+ file_system = __wt_fs_file_system(session);
wt_session = (WT_SESSION *)session;
ret = file_system->fs_size(file_system, wt_session, path, sizep);