summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2016-05-24 12:20:39 +1000
committerMichael Cahill <michael.cahill@mongodb.com>2016-05-24 12:20:39 +1000
commitcace8acbbea275f9e1d7ed92c7489ff8ca8596d3 (patch)
tree0edea673be516a0200e61474e18e71518e7afc4f
parent2c16e4a8a669ee1aa22fbed2c7c4351c54fc74f1 (diff)
downloadmongo-cace8acbbea275f9e1d7ed92c7489ff8ca8596d3.tar.gz
WT-2630 Rename pluggable filesystem methods to avoid reserved names. (#2730)
* WT-2630 Rename pluggable filesystem methods to avoid reserved names. Use "fstr" consistently as the variable name and prefix for WT_FSTREAM.
-rw-r--r--examples/c/ex_file_system.c44
-rw-r--r--src/block/block_map.c6
-rw-r--r--src/block/block_mgr.c2
-rw-r--r--src/block/block_read.c12
-rw-r--r--src/block/block_write.c9
-rw-r--r--src/conn/conn_api.c14
-rw-r--r--src/include/extern.h2
-rw-r--r--src/include/os.h7
-rw-r--r--src/include/os_fhandle.i29
-rw-r--r--src/include/os_fs.i17
-rw-r--r--src/include/os_fstream.i42
-rw-r--r--src/include/wiredtiger.in48
-rw-r--r--src/os_common/os_fhandle.c10
-rw-r--r--src/os_common/os_fs_inmemory.c22
-rw-r--r--src/os_common/os_fstream.c98
-rw-r--r--src/os_common/os_fstream_stdio.c6
-rw-r--r--src/os_posix/os_fallocate.c16
-rw-r--r--src/os_posix/os_fs.c44
-rw-r--r--src/os_posix/os_map.c2
-rw-r--r--src/os_win/os_fs.c30
20 files changed, 233 insertions, 227 deletions
diff --git a/examples/c/ex_file_system.c b/examples/c/ex_file_system.c
index 6522a386b9a..3b632df252e 100644
--- a/examples/c/ex_file_system.c
+++ b/examples/c/ex_file_system.c
@@ -148,14 +148,14 @@ demo_file_system_create(WT_CONNECTION *conn, WT_CONFIG_ARG *config)
file_system = (WT_FILE_SYSTEM *)demo_fs;
/* Initialize the in-memory jump table. */
- file_system->directory_list = demo_fs_directory_list;
- file_system->directory_list_free = demo_fs_directory_list_free;
- file_system->directory_sync = demo_fs_directory_sync;
- file_system->exist = demo_fs_exist;
- file_system->open_file = demo_fs_open;
- file_system->remove = demo_fs_remove;
- file_system->rename = demo_fs_rename;
- file_system->size = demo_fs_size;
+ file_system->fs_directory_list = demo_fs_directory_list;
+ file_system->fs_directory_list_free = demo_fs_directory_list_free;
+ file_system->fs_directory_sync = demo_fs_directory_sync;
+ file_system->fs_exist = demo_fs_exist;
+ file_system->fs_open_file = demo_fs_open;
+ file_system->fs_remove = demo_fs_remove;
+ file_system->fs_rename = demo_fs_rename;
+ file_system->fs_size = demo_fs_size;
file_system->terminate = demo_fs_terminate;
if ((ret = conn->set_file_system(conn, file_system, NULL)) != 0) {
@@ -236,20 +236,20 @@ demo_fs_open(WT_FILE_SYSTEM *file_system, WT_SESSION *session,
* the functionality.
*/
file_handle->close = demo_file_close;
- file_handle->fadvise = NULL;
- file_handle->fallocate = NULL;
- file_handle->fallocate_nolock = NULL;
- file_handle->lock = demo_file_lock;
- file_handle->map = NULL;
- file_handle->map_discard = NULL;
- file_handle->map_preload = NULL;
- file_handle->unmap = NULL;
- file_handle->read = demo_file_read;
- file_handle->size = demo_file_size;
- file_handle->sync = demo_file_sync;
- file_handle->sync_nowait = demo_file_sync_nowait;
- file_handle->truncate = demo_file_truncate;
- file_handle->write = demo_file_write;
+ file_handle->fh_advise = NULL;
+ file_handle->fh_allocate = NULL;
+ file_handle->fh_allocate_nolock = NULL;
+ file_handle->fh_lock = demo_file_lock;
+ file_handle->fh_map = NULL;
+ file_handle->fh_map_discard = NULL;
+ file_handle->fh_map_preload = NULL;
+ file_handle->fh_unmap = NULL;
+ file_handle->fh_read = demo_file_read;
+ file_handle->fh_size = demo_file_size;
+ file_handle->fh_sync = demo_file_sync;
+ file_handle->fh_sync_nowait = demo_file_sync_nowait;
+ file_handle->fh_truncate = demo_file_truncate;
+ file_handle->fh_write = demo_file_write;
TAILQ_INSERT_HEAD(&demo_fs->fileq, demo_fh, q);
++demo_fs->opened_unique_file_count;
diff --git a/src/block/block_map.c b/src/block/block_map.c
index ce6fe8602f5..d2c70fb4c49 100644
--- a/src/block/block_map.c
+++ b/src/block/block_map.c
@@ -46,7 +46,7 @@ __wt_block_map(WT_SESSION_IMPL *session, WT_BLOCK *block,
* There may be no underlying functionality.
*/
handle = block->fh->handle;
- if (handle->map == NULL)
+ if (handle->fh_map == NULL)
return (0);
/*
@@ -54,7 +54,7 @@ __wt_block_map(WT_SESSION_IMPL *session, WT_BLOCK *block,
* Ignore not-supported errors, we'll read the file through the cache
* if map fails.
*/
- ret = handle->map(handle,
+ ret = handle->fh_map(handle,
(WT_SESSION *)session, mapped_regionp, lengthp, mapped_cookiep);
if (ret == ENOTSUP) {
*(void **)mapped_regionp = NULL;
@@ -76,6 +76,6 @@ __wt_block_unmap(WT_SESSION_IMPL *session,
/* Unmap the file from memory. */
handle = block->fh->handle;
- return (handle->unmap(handle,
+ return (handle->fh_unmap(handle,
(WT_SESSION *)session, mapped_region, length, mapped_cookie));
}
diff --git a/src/block/block_mgr.c b/src/block/block_mgr.c
index 465952d8ca5..971fe713f83 100644
--- a/src/block/block_mgr.c
+++ b/src/block/block_mgr.c
@@ -311,7 +311,7 @@ __bm_map_discard(WT_BM *bm, WT_SESSION_IMPL *session, void *map, size_t len)
WT_FILE_HANDLE *handle;
handle = bm->block->fh->handle;
- return (handle->map_discard(
+ return (handle->fh_map_discard(
handle, (WT_SESSION *)session, map, len, bm->mapped_cookie));
}
diff --git a/src/block/block_read.c b/src/block/block_read.c
index 7304f6ff4bc..97157e4a0f1 100644
--- a/src/block/block_read.c
+++ b/src/block/block_read.c
@@ -35,11 +35,11 @@ __wt_bm_preload(
handle = block->fh->handle;
mapped = bm->map != NULL && offset + size <= (wt_off_t)bm->maplen;
- if (mapped && handle->map_preload != NULL)
- ret = handle->map_preload(handle, (WT_SESSION *)session,
+ if (mapped && handle->fh_map_preload != NULL)
+ ret = handle->fh_map_preload(handle, (WT_SESSION *)session,
(uint8_t *)bm->map + offset, size, bm->mapped_cookie);
- if (!mapped && handle->fadvise != NULL)
- ret = handle->fadvise(handle, (WT_SESSION *)session,
+ if (!mapped && handle->fh_advise != NULL)
+ ret = handle->fh_advise(handle, (WT_SESSION *)session,
(wt_off_t)offset, (wt_off_t)size, WT_FILE_HANDLE_WILLNEED);
if (ret != EBUSY && ret != ENOTSUP)
return (ret);
@@ -78,10 +78,10 @@ __wt_bm_read(WT_BM *bm, WT_SESSION_IMPL *session,
*/
handle = block->fh->handle;
mapped = bm->map != NULL && offset + size <= (wt_off_t)bm->maplen;
- if (mapped && handle->map_preload != NULL) {
+ if (mapped && handle->fh_map_preload != NULL) {
buf->data = (uint8_t *)bm->map + offset;
buf->size = size;
- ret = handle->map_preload(handle, (WT_SESSION *)session,
+ ret = handle->fh_map_preload(handle, (WT_SESSION *)session,
buf->data, buf->size,bm->mapped_cookie);
WT_STAT_FAST_CONN_INCR(session, block_map_read);
diff --git a/src/block/block_write.c b/src/block/block_write.c
index 4f1224f3c13..1fefeee09da 100644
--- a/src/block/block_write.c
+++ b/src/block/block_write.c
@@ -52,7 +52,7 @@ __wt_block_discard(WT_SESSION_IMPL *session, WT_BLOCK *block, size_t added_size)
/* The file may not support this call. */
handle = block->fh->handle;
- if (handle->fadvise == NULL)
+ if (handle->fh_advise == NULL)
return (0);
/* The call may not be configured. */
@@ -67,7 +67,7 @@ __wt_block_discard(WT_SESSION_IMPL *session, WT_BLOCK *block, size_t added_size)
return (0);
block->os_cache = 0;
- ret = handle->fadvise(handle, (WT_SESSION *)session,
+ ret = handle->fh_advise(handle, (WT_SESSION *)session,
(wt_off_t)0, (wt_off_t)0, WT_FILE_HANDLE_DONTNEED);
return (ret == EBUSY || ret == ENOTSUP ? 0 : ret);
}
@@ -128,7 +128,8 @@ __wt_block_extend(WT_SESSION_IMPL *session, WT_BLOCK *block,
* and remember that ftruncate requires locking.
*/
handle = fh->handle;
- if (handle->fallocate != NULL || handle->fallocate_nolock != NULL) {
+ if (handle->fh_allocate != NULL ||
+ handle->fh_allocate_nolock != NULL) {
/*
* Release any locally acquired lock if not needed to extend the
* file, extending the file may require updating on-disk file's
@@ -136,7 +137,7 @@ __wt_block_extend(WT_SESSION_IMPL *session, WT_BLOCK *block,
* configure for file extension on systems that require locking
* over the extend call.)
*/
- if (handle->fallocate_nolock != NULL && *release_lockp) {
+ if (handle->fh_allocate_nolock != NULL && *release_lockp) {
*release_lockp = locked = false;
__wt_spin_unlock(session, &block->live_lock);
}
diff --git a/src/conn/conn_api.c b/src/conn/conn_api.c
index 18ad383ec74..6e7b07693d5 100644
--- a/src/conn/conn_api.c
+++ b/src/conn/conn_api.c
@@ -1919,16 +1919,16 @@ __conn_chk_file_system(WT_SESSION_IMPL *session, bool readonly)
WT_RET_MSG(session, EINVAL, \
"a WT_FILE_SYSTEM.%s method must be configured", #name)
- WT_CONN_SET_FILE_SYSTEM_REQ(directory_list);
- WT_CONN_SET_FILE_SYSTEM_REQ(directory_list_free);
+ WT_CONN_SET_FILE_SYSTEM_REQ(fs_directory_list);
+ WT_CONN_SET_FILE_SYSTEM_REQ(fs_directory_list_free);
/* not required: directory_sync */
- WT_CONN_SET_FILE_SYSTEM_REQ(exist);
- WT_CONN_SET_FILE_SYSTEM_REQ(open_file);
+ WT_CONN_SET_FILE_SYSTEM_REQ(fs_exist);
+ WT_CONN_SET_FILE_SYSTEM_REQ(fs_open_file);
if (!readonly) {
- WT_CONN_SET_FILE_SYSTEM_REQ(remove);
- WT_CONN_SET_FILE_SYSTEM_REQ(rename);
+ WT_CONN_SET_FILE_SYSTEM_REQ(fs_remove);
+ WT_CONN_SET_FILE_SYSTEM_REQ(fs_rename);
}
- WT_CONN_SET_FILE_SYSTEM_REQ(size);
+ WT_CONN_SET_FILE_SYSTEM_REQ(fs_size);
return (0);
}
diff --git a/src/include/extern.h b/src/include/extern.h
index 53e49e51a26..f534785ebea 100644
--- a/src/include/extern.h
+++ b/src/include/extern.h
@@ -730,7 +730,7 @@ extern int __wt_dlsym(WT_SESSION_IMPL *session, WT_DLH *dlh, const char *name, b
extern int __wt_epoch(WT_SESSION_IMPL *session, struct timespec *tsp);
extern int __wt_errno(void);
extern int __wt_filename(WT_SESSION_IMPL *session, const char *name, char **path);
-extern int __wt_fopen(WT_SESSION_IMPL *session, const char *name, uint32_t open_flags, uint32_t flags, WT_FSTREAM **fsp);
+extern int __wt_fopen(WT_SESSION_IMPL *session, const char *name, uint32_t open_flags, uint32_t flags, WT_FSTREAM **fstrp);
extern int __wt_get_vm_pagesize(void);
extern int __wt_getenv(WT_SESSION_IMPL *session, const char *variable, const char **envp);
extern int __wt_getlasterror(void);
diff --git a/src/include/os.h b/src/include/os.h
index bf60f32f764..1e08683bc83 100644
--- a/src/include/os.h
+++ b/src/include/os.h
@@ -141,7 +141,8 @@ struct __wt_fstream {
uint32_t flags;
int (*close)(WT_SESSION_IMPL *, WT_FSTREAM *);
- int (*flush)(WT_SESSION_IMPL *, WT_FSTREAM *);
- int (*getline)(WT_SESSION_IMPL *, WT_FSTREAM *, WT_ITEM *);
- int (*printf)(WT_SESSION_IMPL *, WT_FSTREAM *, const char *, va_list);
+ int (*fstr_flush)(WT_SESSION_IMPL *, WT_FSTREAM *);
+ int (*fstr_getline)(WT_SESSION_IMPL *, WT_FSTREAM *, WT_ITEM *);
+ int (*fstr_printf)(
+ WT_SESSION_IMPL *, WT_FSTREAM *, const char *, va_list);
};
diff --git a/src/include/os_fhandle.i b/src/include/os_fhandle.i
index 8d2cda4b305..cf790d6bc4d 100644
--- a/src/include/os_fhandle.i
+++ b/src/include/os_fhandle.i
@@ -22,11 +22,11 @@ __wt_fsync(WT_SESSION_IMPL *session, WT_FH *fh, bool block)
handle = fh->handle;
if (block)
- return (handle->sync == NULL ? 0 :
- handle->sync(handle, (WT_SESSION *)session));
+ return (handle->fh_sync == NULL ? 0 :
+ handle->fh_sync(handle, (WT_SESSION *)session));
else
- return (handle->sync_nowait == NULL ? 0 :
- handle->sync_nowait(handle, (WT_SESSION *)session));
+ return (handle->fh_sync_nowait == NULL ? 0 :
+ handle->fh_sync_nowait(handle, (WT_SESSION *)session));
}
/*
@@ -55,14 +55,14 @@ __wt_fallocate(
* flavor, that failed, and we have to fallback to the locking flavor.
*/
handle = fh->handle;
- if (handle->fallocate_nolock != NULL) {
- if ((ret = handle->fallocate_nolock(
+ if (handle->fh_allocate_nolock != NULL) {
+ if ((ret = handle->fh_allocate_nolock(
handle, (WT_SESSION *)session, offset, len)) == 0)
return (0);
WT_RET_ERROR_OK(ret, ENOTSUP);
}
- if (handle->fallocate != NULL)
- return (handle->fallocate(
+ if (handle->fh_allocate != NULL)
+ return (handle->fh_allocate(
handle, (WT_SESSION *)session, offset, len));
return (ENOTSUP);
}
@@ -80,8 +80,8 @@ __wt_file_lock(WT_SESSION_IMPL * session, WT_FH *fh, bool lock)
"%s: handle-lock: %s", fh->handle->name, lock ? "lock" : "unlock"));
handle = fh->handle;
- return (handle->lock == NULL ? 0 :
- handle->lock(handle, (WT_SESSION*)session, lock));
+ return (handle->fh_lock == NULL ? 0 :
+ handle->fh_lock(handle, (WT_SESSION*)session, lock));
}
/*
@@ -98,7 +98,7 @@ __wt_read(
WT_STAT_FAST_CONN_INCR(session, read_io);
- return (fh->handle->read(
+ return (fh->handle->fh_read(
fh->handle, (WT_SESSION *)session, offset, len, buf));
}
@@ -112,7 +112,7 @@ __wt_filesize(WT_SESSION_IMPL *session, WT_FH *fh, wt_off_t *sizep)
WT_RET(__wt_verbose(
session, WT_VERB_HANDLEOPS, "%s: handle-size", fh->handle->name));
- return (fh->handle->size(fh->handle, (WT_SESSION *)session, sizep));
+ return (fh->handle->fh_size(fh->handle, (WT_SESSION *)session, sizep));
}
/*
@@ -128,7 +128,8 @@ __wt_ftruncate(WT_SESSION_IMPL *session, WT_FH *fh, wt_off_t len)
"%s: handle-truncate: %" PRIuMAX,
fh->handle->name, (uintmax_t)len));
- return (fh->handle->truncate(fh->handle, (WT_SESSION *)session, len));
+ return (fh->handle->fh_truncate(
+ fh->handle, (WT_SESSION *)session, len));
}
/*
@@ -149,6 +150,6 @@ __wt_write(WT_SESSION_IMPL *session,
WT_STAT_FAST_CONN_INCR(session, write_io);
- return (fh->handle->write(
+ return (fh->handle->fh_write(
fh->handle, (WT_SESSION *)session, offset, len, buf));
}
diff --git a/src/include/os_fs.i b/src/include/os_fs.i
index 151898711d8..88ee71d953a 100644
--- a/src/include/os_fs.i
+++ b/src/include/os_fs.i
@@ -30,7 +30,7 @@ __wt_fs_directory_list(WT_SESSION_IMPL *session,
file_system = S2C(session)->file_system;
wt_session = (WT_SESSION *)session;
- ret = file_system->directory_list(
+ ret = file_system->fs_directory_list(
file_system, wt_session, path, prefix, dirlistp, countp);
__wt_free(session, path);
@@ -52,7 +52,7 @@ __wt_fs_directory_list_free(
if (*dirlistp != NULL) {
file_system = S2C(session)->file_system;
wt_session = (WT_SESSION *)session;
- ret = file_system->directory_list_free(
+ ret = file_system->fs_directory_list_free(
file_system, wt_session, *dirlistp, count);
}
@@ -88,7 +88,7 @@ __wt_fs_directory_sync(WT_SESSION_IMPL *session, const char *name)
* needed.
*/
file_system = S2C(session)->file_system;
- if (file_system->directory_sync == NULL)
+ if (file_system->fs_directory_sync == NULL)
return (0);
copy = NULL;
@@ -109,7 +109,7 @@ __wt_fs_directory_sync(WT_SESSION_IMPL *session, const char *name)
}
wt_session = (WT_SESSION *)session;
- ret = file_system->directory_sync(file_system, wt_session, name);
+ ret = file_system->fs_directory_sync(file_system, wt_session, name);
__wt_free(session, copy);
return (ret);
@@ -133,7 +133,7 @@ __wt_fs_exist(WT_SESSION_IMPL *session, const char *name, bool *existp)
file_system = S2C(session)->file_system;
wt_session = (WT_SESSION *)session;
- ret = file_system->exist(file_system, wt_session, path, existp);
+ ret = file_system->fs_exist(file_system, wt_session, path, existp);
__wt_free(session, path);
return (ret);
@@ -169,7 +169,7 @@ __wt_fs_remove(WT_SESSION_IMPL *session, const char *name)
file_system = S2C(session)->file_system;
wt_session = (WT_SESSION *)session;
- ret = file_system->remove(file_system, wt_session, path);
+ ret = file_system->fs_remove(file_system, wt_session, path);
__wt_free(session, path);
return (ret);
@@ -211,7 +211,8 @@ __wt_fs_rename(WT_SESSION_IMPL *session, const char *from, const char *to)
file_system = S2C(session)->file_system;
wt_session = (WT_SESSION *)session;
- ret = file_system->rename(file_system, wt_session, from_path, to_path);
+ ret = file_system->fs_rename(
+ file_system, wt_session, from_path, to_path);
err: __wt_free(session, from_path);
__wt_free(session, to_path);
@@ -236,7 +237,7 @@ __wt_fs_size(WT_SESSION_IMPL *session, const char *name, wt_off_t *sizep)
file_system = S2C(session)->file_system;
wt_session = (WT_SESSION *)session;
- ret = file_system->size(file_system, wt_session, path, sizep);
+ ret = file_system->fs_size(file_system, wt_session, path, sizep);
__wt_free(session, path);
return (ret);
diff --git a/src/include/os_fstream.i b/src/include/os_fstream.i
index 37a6039d1b7..8c0fdadbdb0 100644
--- a/src/include/os_fstream.i
+++ b/src/include/os_fstream.i
@@ -11,9 +11,9 @@
* Get a line from a stream.
*/
static inline int
-__wt_getline(WT_SESSION_IMPL *session, WT_FSTREAM *fs, WT_ITEM *buf)
+__wt_getline(WT_SESSION_IMPL *session, WT_FSTREAM *fstr, WT_ITEM *buf)
{
- return (fs->getline(session, fs, buf));
+ return (fstr->fstr_getline(session, fstr, buf));
}
/*
@@ -21,14 +21,14 @@ __wt_getline(WT_SESSION_IMPL *session, WT_FSTREAM *fs, WT_ITEM *buf)
* Close a stream.
*/
static inline int
-__wt_fclose(WT_SESSION_IMPL *session, WT_FSTREAM **fsp)
+__wt_fclose(WT_SESSION_IMPL *session, WT_FSTREAM **fstrp)
{
- WT_FSTREAM *fs;
+ WT_FSTREAM *fstr;
- if ((fs = *fsp) == NULL)
+ if ((fstr = *fstrp) == NULL)
return (0);
- *fsp = NULL;
- return (fs->close(session, fs));
+ *fstrp = NULL;
+ return (fstr->close(session, fstr));
}
/*
@@ -36,9 +36,9 @@ __wt_fclose(WT_SESSION_IMPL *session, WT_FSTREAM **fsp)
* Flush a stream.
*/
static inline int
-__wt_fflush(WT_SESSION_IMPL *session, WT_FSTREAM *fs)
+__wt_fflush(WT_SESSION_IMPL *session, WT_FSTREAM *fstr)
{
- return (fs->flush(session, fs));
+ return (fstr->fstr_flush(session, fstr));
}
/*
@@ -47,12 +47,12 @@ __wt_fflush(WT_SESSION_IMPL *session, WT_FSTREAM *fs)
*/
static inline int
__wt_vfprintf(
- WT_SESSION_IMPL *session, WT_FSTREAM *fs, const char *fmt, va_list ap)
+ WT_SESSION_IMPL *session, WT_FSTREAM *fstr, const char *fmt, va_list ap)
{
WT_RET(__wt_verbose(
- session, WT_VERB_HANDLEOPS, "%s: handle-printf", fs->name));
+ session, WT_VERB_HANDLEOPS, "%s: handle-printf", fstr->name));
- return (fs->printf(session, fs, fmt, ap));
+ return (fstr->fstr_printf(session, fstr, fmt, ap));
}
/*
@@ -60,14 +60,14 @@ __wt_vfprintf(
* ANSI C fprintf.
*/
static inline int
-__wt_fprintf(WT_SESSION_IMPL *session, WT_FSTREAM *fs, const char *fmt, ...)
+__wt_fprintf(WT_SESSION_IMPL *session, WT_FSTREAM *fstr, const char *fmt, ...)
WT_GCC_FUNC_ATTRIBUTE((format (printf, 3, 4)))
{
WT_DECL_RET;
va_list ap;
va_start(ap, fmt);
- ret = __wt_vfprintf(session, fs, fmt, ap);
+ ret = __wt_vfprintf(session, fstr, fmt, ap);
va_end(ap);
return (ret);
@@ -79,18 +79,18 @@ __wt_fprintf(WT_SESSION_IMPL *session, WT_FSTREAM *fs, const char *fmt, ...)
*/
static inline int
__wt_sync_and_rename(WT_SESSION_IMPL *session,
- WT_FSTREAM **fsp, const char *from, const char *to)
+ WT_FSTREAM **fstrp, const char *from, const char *to)
{
WT_DECL_RET;
- WT_FSTREAM *fs;
+ WT_FSTREAM *fstr;
- fs = *fsp;
- *fsp = NULL;
+ fstr = *fstrp;
+ *fstrp = NULL;
/* Flush to disk and close the handle. */
- WT_TRET(__wt_fflush(session, fs));
- WT_TRET(__wt_fsync(session, fs->fh, true));
- WT_TRET(__wt_fclose(session, &fs));
+ WT_TRET(__wt_fflush(session, fstr));
+ WT_TRET(__wt_fsync(session, fstr->fh, true));
+ WT_TRET(__wt_fclose(session, &fstr));
WT_RET(ret);
return (__wt_rename_and_sync_directory(session, from, to));
diff --git a/src/include/wiredtiger.in b/src/include/wiredtiger.in
index 4aef84f5f8c..243841c3227 100644
--- a/src/include/wiredtiger.in
+++ b/src/include/wiredtiger.in
@@ -3756,9 +3756,9 @@ struct __wt_file_system {
* directory.
* @param[out] countp the method the number of entries returned
*/
- int (*directory_list)(WT_FILE_SYSTEM *file_system, WT_SESSION *session,
- const char *directory, const char *prefix, char ***dirlist,
- uint32_t *countp);
+ int (*fs_directory_list)(WT_FILE_SYSTEM *file_system,
+ WT_SESSION *session, const char *directory, const char *prefix,
+ char ***dirlist, uint32_t *countp);
/*!
* Free memory allocated by WT_FILE_SYSTEM::directory_list.
@@ -3770,7 +3770,7 @@ struct __wt_file_system {
* @param dirlist array returned by WT_FILE_SYSTEM::directory_list
* @param count count returned by WT_FILE_SYSTEM::directory_list
*/
- int (*directory_list_free)(WT_FILE_SYSTEM *file_system,
+ int (*fs_directory_list_free)(WT_FILE_SYSTEM *file_system,
WT_SESSION *session, char **dirlist, uint32_t count);
/*!
@@ -3787,7 +3787,7 @@ struct __wt_file_system {
* @param session the current WiredTiger session
* @param directory the name of the directory
*/
- int (*directory_sync)(WT_FILE_SYSTEM *file_system,
+ int (*fs_directory_sync)(WT_FILE_SYSTEM *file_system,
WT_SESSION *session, const char *directory);
/*!
@@ -3800,7 +3800,7 @@ struct __wt_file_system {
* @param name the name of the file
* @param[out] existp If the named file system object exists
*/
- int (*exist)(WT_FILE_SYSTEM *file_system,
+ int (*fs_exist)(WT_FILE_SYSTEM *file_system,
WT_SESSION *session, const char *name, bool *existp);
/*!
@@ -3824,7 +3824,7 @@ struct __wt_file_system {
* with the WT_FILE_HANDLE:: structure should declare and allocate
* their own structure as a superset of a WT_FILE_HANDLE:: structure.
*/
- int (*open_file)(WT_FILE_SYSTEM *file_system, WT_SESSION *session,
+ int (*fs_open_file)(WT_FILE_SYSTEM *file_system, WT_SESSION *session,
const char *name, WT_OPEN_FILE_TYPE file_type, uint32_t flags,
WT_FILE_HANDLE **file_handlep);
@@ -3840,7 +3840,7 @@ struct __wt_file_system {
* @param session the current WiredTiger session
* @param name the name of the file system object
*/
- int (*remove)(
+ int (*fs_remove)(
WT_FILE_SYSTEM *file_system, WT_SESSION *session, const char *name);
/*!
@@ -3856,7 +3856,7 @@ struct __wt_file_system {
* @param from the original name of the object
* @param to the new name for the object
*/
- int (*rename)(WT_FILE_SYSTEM *file_system,
+ int (*fs_rename)(WT_FILE_SYSTEM *file_system,
WT_SESSION *session, const char *from, const char *to);
/*!
@@ -3869,7 +3869,7 @@ struct __wt_file_system {
* @param name the name of the file system object
* @param[out] sizep the size of the file system entry
*/
- int (*size)(WT_FILE_SYSTEM *file_system,
+ int (*fs_size)(WT_FILE_SYSTEM *file_system,
WT_SESSION *session, const char *name, wt_off_t *sizep);
/*!
@@ -3938,7 +3938,7 @@ struct __wt_file_handle {
* @param advice one of ::WT_FILE_HANDLE_WILLNEED or
* ::WT_FILE_HANDLE_DONTNEED.
*/
- int (*fadvise)(WT_FILE_HANDLE *file_handle,
+ int (*fh_advise)(WT_FILE_HANDLE *file_handle,
WT_SESSION *session, wt_off_t offset, wt_off_t len, int advice);
/*!
@@ -3960,7 +3960,7 @@ struct __wt_file_handle {
* @param offset the file offset
* @param len the size of the advisory
*/
- int (*fallocate)(WT_FILE_HANDLE *file_handle,
+ int (*fh_allocate)(WT_FILE_HANDLE *file_handle,
WT_SESSION *session, wt_off_t, wt_off_t);
/*!
@@ -3982,7 +3982,7 @@ struct __wt_file_handle {
* @param offset the file offset
* @param len the size of the advisory
*/
- int (*fallocate_nolock)(WT_FILE_HANDLE *file_handle,
+ int (*fh_allocate_nolock)(WT_FILE_HANDLE *file_handle,
WT_SESSION *session, wt_off_t, wt_off_t);
/*!
@@ -3995,7 +3995,7 @@ struct __wt_file_handle {
* @param session the current WiredTiger session
* @param lock whether to lock or unlock
*/
- int (*lock)(
+ int (*fh_lock)(
WT_FILE_HANDLE *file_handle, WT_SESSION *session, bool lock);
/*!
@@ -4016,7 +4016,7 @@ struct __wt_file_handle {
* which can be optionally stored a pointer to an opaque cookie
* which is subsequently passed to WT_FILE_HANDLE::unmap.
*/
- int (*map)(WT_FILE_HANDLE *file_handle, WT_SESSION *session,
+ int (*fh_map)(WT_FILE_HANDLE *file_handle, WT_SESSION *session,
void *mapped_regionp, size_t *lengthp, void *mapped_cookiep);
/*!
@@ -4035,7 +4035,7 @@ struct __wt_file_handle {
* @param length the length of the mapped region to discard
* @param mapped_cookie any cookie set by the WT_FILE_HANDLE::map method
*/
- int (*map_discard)(WT_FILE_HANDLE *file_handle,
+ int (*fh_map_discard)(WT_FILE_HANDLE *file_handle,
WT_SESSION *session, void *map, size_t length, void *mapped_cookie);
/*!
@@ -4054,7 +4054,7 @@ struct __wt_file_handle {
* @param length the size of the mapped region to preload
* @param mapped_cookie any cookie set by the WT_FILE_HANDLE::map method
*/
- int (*map_preload)(WT_FILE_HANDLE *file_handle, WT_SESSION *session,
+ int (*fh_map_preload)(WT_FILE_HANDLE *file_handle, WT_SESSION *session,
const void *map, size_t length, void *mapped_cookie);
/*!
@@ -4072,7 +4072,7 @@ struct __wt_file_handle {
* @param length the length of the mapped region
* @param mapped_cookie any cookie set by the WT_FILE_HANDLE::map method
*/
- int (*unmap)(WT_FILE_HANDLE *file_handle, WT_SESSION *session,
+ int (*fh_unmap)(WT_FILE_HANDLE *file_handle, WT_SESSION *session,
void *mapped_region, size_t length, void *mapped_cookie);
/*!
@@ -4086,7 +4086,7 @@ struct __wt_file_handle {
* @param len the amount to read
* @param[out] buf buffer to hold the content read from file
*/
- int (*read)(WT_FILE_HANDLE *file_handle,
+ int (*fh_read)(WT_FILE_HANDLE *file_handle,
WT_SESSION *session, wt_off_t offset, size_t len, void *buf);
/*!
@@ -4098,7 +4098,7 @@ struct __wt_file_handle {
* @param session the current WiredTiger session
* @param sizep the size of the file
*/
- int (*size)(
+ int (*fh_size)(
WT_FILE_HANDLE *file_handle, WT_SESSION *session, wt_off_t *sizep);
/*!
@@ -4113,7 +4113,7 @@ struct __wt_file_handle {
* @param file_handle the WT_FILE_HANDLE
* @param session the current WiredTiger session
*/
- int (*sync)(WT_FILE_HANDLE *file_handle, WT_SESSION *session);
+ int (*fh_sync)(WT_FILE_HANDLE *file_handle, WT_SESSION *session);
/*!
* Schedule the outstanding file writes required for durability and
@@ -4127,7 +4127,7 @@ struct __wt_file_handle {
* @param file_handle the WT_FILE_HANDLE
* @param session the current WiredTiger session
*/
- int (*sync_nowait)(WT_FILE_HANDLE *file_handle, WT_SESSION *session);
+ int (*fh_sync_nowait)(WT_FILE_HANDLE *file_handle, WT_SESSION *session);
/*!
* Lengthen or shorten a file to the specified length, based on the
@@ -4142,7 +4142,7 @@ struct __wt_file_handle {
* @param session the current WiredTiger session
* @param length desired file size after truncate
*/
- int (*truncate)(
+ int (*fh_truncate)(
WT_FILE_HANDLE *file_handle, WT_SESSION *session, wt_off_t length);
/*!
@@ -4159,7 +4159,7 @@ struct __wt_file_handle {
* @param length amount of data to write
* @param buf content to be written to the file
*/
- int (*write)(WT_FILE_HANDLE *file_handle, WT_SESSION *session,
+ int (*fh_write)(WT_FILE_HANDLE *file_handle, WT_SESSION *session,
wt_off_t offset, size_t length, const void *buf);
};
#endif /* !defined(SWIG) */
diff --git a/src/os_common/os_fhandle.c b/src/os_common/os_fhandle.c
index 818829203e0..50404c8b354 100644
--- a/src/os_common/os_fhandle.c
+++ b/src/os_common/os_fhandle.c
@@ -32,13 +32,13 @@ __fhandle_method_finalize(
/* not required: map_discard */
/* not required: map_preload */
/* not required: map_unmap */
- WT_HANDLE_METHOD_REQ(read);
- WT_HANDLE_METHOD_REQ(size);
+ WT_HANDLE_METHOD_REQ(fh_read);
+ WT_HANDLE_METHOD_REQ(fh_size);
/* not required: sync */
/* not required: sync_nowait */
if (!readonly) {
- WT_HANDLE_METHOD_REQ(truncate);
- WT_HANDLE_METHOD_REQ(write);
+ WT_HANDLE_METHOD_REQ(fh_truncate);
+ WT_HANDLE_METHOD_REQ(fh_write);
}
return (0);
@@ -255,7 +255,7 @@ __wt_open(WT_SESSION_IMPL *session,
WT_ERR(__wt_filename(session, name, &path));
/* Call the underlying open function. */
- WT_ERR(file_system->open_file(file_system, &session->iface,
+ WT_ERR(file_system->fs_open_file(file_system, &session->iface,
path == NULL ? name : path, file_type, flags, &fh->handle));
open_called = true;
diff --git a/src/os_common/os_fs_inmemory.c b/src/os_common/os_fs_inmemory.c
index 53da3f10e5c..3e4fe628892 100644
--- a/src/os_common/os_fs_inmemory.c
+++ b/src/os_common/os_fs_inmemory.c
@@ -512,10 +512,10 @@ __im_file_open(WT_FILE_SYSTEM *file_system, WT_SESSION *wt_session,
WT_FILE_HANDLE_INSERT(im_fs, im_fh, bucket);
file_handle->close = __im_file_close;
- file_handle->read = __im_file_read;
- file_handle->size = __im_file_size;
- file_handle->truncate = __im_file_truncate;
- file_handle->write = __im_file_write;
+ file_handle->fh_read = __im_file_read;
+ file_handle->fh_size = __im_file_size;
+ file_handle->fh_truncate = __im_file_truncate;
+ file_handle->fh_write = __im_file_write;
*file_handlep = file_handle;
@@ -576,13 +576,13 @@ __wt_os_inmemory(WT_SESSION_IMPL *session)
/* Initialize the in-memory jump table. */
file_system = (WT_FILE_SYSTEM *)im_fs;
- file_system->directory_list = __im_fs_directory_list;
- file_system->directory_list_free = __im_fs_directory_list_free;
- file_system->exist = __im_fs_exist;
- file_system->open_file = __im_file_open;
- file_system->remove = __im_fs_remove;
- file_system->rename = __im_fs_rename;
- file_system->size = __im_fs_size;
+ file_system->fs_directory_list = __im_fs_directory_list;
+ file_system->fs_directory_list_free = __im_fs_directory_list_free;
+ file_system->fs_exist = __im_fs_exist;
+ file_system->fs_open_file = __im_file_open;
+ file_system->fs_remove = __im_fs_remove;
+ file_system->fs_rename = __im_fs_rename;
+ file_system->fs_size = __im_fs_size;
file_system->terminate = __im_terminate;
/* Switch the file system into place. */
diff --git a/src/os_common/os_fstream.c b/src/os_common/os_fstream.c
index df2b07ea91e..0b199529e19 100644
--- a/src/os_common/os_fstream.c
+++ b/src/os_common/os_fstream.c
@@ -16,16 +16,16 @@
* Close a stream handle.
*/
static int
-__fstream_close(WT_SESSION_IMPL *session, WT_FSTREAM *fs)
+__fstream_close(WT_SESSION_IMPL *session, WT_FSTREAM *fstr)
{
WT_DECL_RET;
- if (!F_ISSET(fs, WT_STREAM_READ))
- WT_TRET(fs->flush(session, fs));
+ if (!F_ISSET(fstr, WT_STREAM_READ))
+ WT_TRET(fstr->fstr_flush(session, fstr));
- WT_TRET(__wt_close(session, &fs->fh));
- __wt_buf_free(session, &fs->buf);
- __wt_free(session, fs);
+ WT_TRET(__wt_close(session, &fstr->fh));
+ __wt_buf_free(session, &fstr->buf);
+ __wt_free(session, fstr);
return (ret);
}
@@ -34,13 +34,13 @@ __fstream_close(WT_SESSION_IMPL *session, WT_FSTREAM *fs)
* Flush the data from a stream.
*/
static int
-__fstream_flush(WT_SESSION_IMPL *session, WT_FSTREAM *fs)
+__fstream_flush(WT_SESSION_IMPL *session, WT_FSTREAM *fstr)
{
- if (fs->buf.size > 0) {
- WT_RET(__wt_write(
- session, fs->fh, fs->off, fs->buf.size, fs->buf.data));
- fs->off += (wt_off_t)fs->buf.size;
- fs->buf.size = 0;
+ if (fstr->buf.size > 0) {
+ WT_RET(__wt_write(session,
+ fstr->fh, fstr->off, fstr->buf.size, fstr->buf.data));
+ fstr->off += (wt_off_t)fstr->buf.size;
+ fstr->buf.size = 0;
}
return (0);
@@ -51,9 +51,9 @@ __fstream_flush(WT_SESSION_IMPL *session, WT_FSTREAM *fs)
* Stream flush unsupported.
*/
static int
-__fstream_flush_notsup(WT_SESSION_IMPL *session, WT_FSTREAM *fs)
+__fstream_flush_notsup(WT_SESSION_IMPL *session, WT_FSTREAM *fstr)
{
- WT_RET_MSG(session, ENOTSUP, "%s: flush", fs->name);
+ WT_RET_MSG(session, ENOTSUP, "%s: flush", fstr->name);
}
/*
@@ -68,7 +68,7 @@ __fstream_flush_notsup(WT_SESSION_IMPL *session, WT_FSTREAM *fs)
* (so the caller's EOF marker is a returned line length of 0).
*/
static int
-__fstream_getline(WT_SESSION_IMPL *session, WT_FSTREAM *fs, WT_ITEM *buf)
+__fstream_getline(WT_SESSION_IMPL *session, WT_FSTREAM *fstr, WT_ITEM *buf)
{
const char *p;
size_t len;
@@ -82,19 +82,20 @@ __fstream_getline(WT_SESSION_IMPL *session, WT_FSTREAM *fs, WT_ITEM *buf)
for (;;) {
/* Check if we need to refill the buffer. */
- if (WT_PTRDIFF(fs->buf.data, fs->buf.mem) >= fs->buf.size) {
+ if (WT_PTRDIFF(fstr->buf.data, fstr->buf.mem) >=
+ fstr->buf.size) {
len = WT_MIN(WT_STREAM_BUFSIZE,
- (size_t)(fs->size - fs->off));
+ (size_t)(fstr->size - fstr->off));
if (len == 0)
break; /* EOF */
- WT_RET(__wt_buf_initsize(session, &fs->buf, len));
+ WT_RET(__wt_buf_initsize(session, &fstr->buf, len));
WT_RET(__wt_read(
- session, fs->fh, fs->off, len, fs->buf.mem));
- fs->off += (wt_off_t)len;
+ session, fstr->fh, fstr->off, len, fstr->buf.mem));
+ fstr->off += (wt_off_t)len;
}
- c = *(p = fs->buf.data);
- fs->buf.data = ++p;
+ c = *(p = fstr->buf.data);
+ fstr->buf.data = ++p;
/* Leave space for a trailing NUL. */
WT_RET(__wt_buf_extend(session, buf, buf->size + 2));
@@ -116,10 +117,11 @@ __fstream_getline(WT_SESSION_IMPL *session, WT_FSTREAM *fs, WT_ITEM *buf)
* Stream getline unsupported.
*/
static int
-__fstream_getline_notsup(WT_SESSION_IMPL *session, WT_FSTREAM *fs, WT_ITEM *buf)
+__fstream_getline_notsup(
+ WT_SESSION_IMPL *session, WT_FSTREAM *fstr, WT_ITEM *buf)
{
WT_UNUSED(buf);
- WT_RET_MSG(session, ENOTSUP, "%s: getline", fs->name);
+ WT_RET_MSG(session, ENOTSUP, "%s: getline", fstr->name);
}
/*
@@ -128,14 +130,14 @@ __fstream_getline_notsup(WT_SESSION_IMPL *session, WT_FSTREAM *fs, WT_ITEM *buf)
*/
static int
__fstream_printf(
- WT_SESSION_IMPL *session, WT_FSTREAM *fs, const char *fmt, va_list ap)
+ WT_SESSION_IMPL *session, WT_FSTREAM *fstr, const char *fmt, va_list ap)
{
WT_ITEM *buf;
va_list ap_copy;
size_t len, space;
char *p;
- buf = &fs->buf;
+ buf = &fstr->buf;
for (;;) {
va_copy(ap_copy, ap);
@@ -149,7 +151,7 @@ __fstream_printf(
buf->size += len;
return (buf->size >= WT_STREAM_BUFSIZE ?
- __wt_fflush(session, fs) : 0);
+ __wt_fflush(session, fstr) : 0);
}
WT_RET(__wt_buf_extend(session, buf, buf->size + len + 1));
}
@@ -161,11 +163,11 @@ __fstream_printf(
*/
static int
__fstream_printf_notsup(
- WT_SESSION_IMPL *session, WT_FSTREAM *fs, const char *fmt, va_list ap)
+ WT_SESSION_IMPL *session, WT_FSTREAM *fstr, const char *fmt, va_list ap)
{
WT_UNUSED(fmt);
WT_UNUSED(ap);
- WT_RET_MSG(session, ENOTSUP, "%s: printf", fs->name);
+ WT_RET_MSG(session, ENOTSUP, "%s: printf", fstr->name);
}
/*
@@ -174,42 +176,42 @@ __fstream_printf_notsup(
*/
int
__wt_fopen(WT_SESSION_IMPL *session,
- const char *name, uint32_t open_flags, uint32_t flags, WT_FSTREAM **fsp)
+ const char *name, uint32_t open_flags, uint32_t flags, WT_FSTREAM **fstrp)
{
WT_DECL_RET;
WT_FH *fh;
- WT_FSTREAM *fs;
+ WT_FSTREAM *fstr;
- *fsp = NULL;
+ *fstrp = NULL;
- fs = NULL;
+ fstr = NULL;
WT_RET(__wt_open(
session, name, WT_OPEN_FILE_TYPE_REGULAR, open_flags, &fh));
- WT_ERR(__wt_calloc_one(session, &fs));
- fs->fh = fh;
- fs->name = fh->name;
- fs->flags = flags;
+ WT_ERR(__wt_calloc_one(session, &fstr));
+ fstr->fh = fh;
+ fstr->name = fh->name;
+ fstr->flags = flags;
- fs->close = __fstream_close;
- WT_ERR(__wt_filesize(session, fh, &fs->size));
+ fstr->close = __fstream_close;
+ WT_ERR(__wt_filesize(session, fh, &fstr->size));
if (LF_ISSET(WT_STREAM_APPEND))
- fs->off = fs->size;
+ fstr->off = fstr->size;
if (LF_ISSET(WT_STREAM_APPEND | WT_STREAM_WRITE)) {
- fs->flush = __fstream_flush;
- fs->getline = __fstream_getline_notsup;
- fs->printf = __fstream_printf;
+ fstr->fstr_flush = __fstream_flush;
+ fstr->fstr_getline = __fstream_getline_notsup;
+ fstr->fstr_printf = __fstream_printf;
} else {
WT_ASSERT(session, LF_ISSET(WT_STREAM_READ));
- fs->flush = __fstream_flush_notsup;
- fs->getline = __fstream_getline;
- fs->printf = __fstream_printf_notsup;
+ fstr->fstr_flush = __fstream_flush_notsup;
+ fstr->fstr_getline = __fstream_getline;
+ fstr->fstr_printf = __fstream_printf_notsup;
}
- *fsp = fs;
+ *fstrp = fstr;
return (0);
err: WT_TRET(__wt_close(session, &fh));
- __wt_free(session, fs);
+ __wt_free(session, fstr);
return (ret);
}
diff --git a/src/os_common/os_fstream_stdio.c b/src/os_common/os_fstream_stdio.c
index 4b0c761024b..eea2c80ff0e 100644
--- a/src/os_common/os_fstream_stdio.c
+++ b/src/os_common/os_fstream_stdio.c
@@ -65,9 +65,9 @@ __stdio_init(WT_FSTREAM *fs, const char *name, FILE *fp)
fs->fp = fp;
fs->close = __stdio_close;
- fs->flush = __stdio_flush;
- fs->getline = __stdio_getline;
- fs->printf = __stdio_printf;
+ fs->fstr_flush = __stdio_flush;
+ fs->fstr_getline = __stdio_getline;
+ fs->fstr_printf = __stdio_printf;
}
/*
diff --git a/src/os_posix/os_fallocate.c b/src/os_posix/os_fallocate.c
index a162dbe01a1..9e5d9519900 100644
--- a/src/os_posix/os_fallocate.c
+++ b/src/os_posix/os_fallocate.c
@@ -125,28 +125,28 @@ __wt_posix_file_fallocate(WT_FILE_HANDLE *file_handle,
* avoid locking on Linux if at all possible.
*/
if (__posix_std_fallocate(file_handle, wt_session, offset, len) == 0) {
- file_handle->fallocate_nolock = __posix_std_fallocate;
- WT_PUBLISH(file_handle->fallocate, NULL);
+ file_handle->fh_allocate_nolock = __posix_std_fallocate;
+ WT_PUBLISH(file_handle->fh_allocate, NULL);
return (0);
}
if (__posix_sys_fallocate(file_handle, wt_session, offset, len) == 0) {
- file_handle->fallocate_nolock = __posix_sys_fallocate;
- WT_PUBLISH(file_handle->fallocate, NULL);
+ file_handle->fh_allocate_nolock = __posix_sys_fallocate;
+ WT_PUBLISH(file_handle->fh_allocate, NULL);
return (0);
}
if (__posix_posix_fallocate(
file_handle, wt_session, offset, len) == 0) {
#if defined(__linux__)
- file_handle->fallocate = __posix_posix_fallocate;
+ file_handle->fh_allocate = __posix_posix_fallocate;
WT_WRITE_BARRIER();
#else
- file_handle->fallocate_nolock = __posix_posix_fallocate;
- WT_PUBLISH(file_handle->fallocate, NULL);
+ file_handle->fh_allocate_nolock = __posix_posix_fallocate;
+ WT_PUBLISH(file_handle->fh_allocate, NULL);
#endif
return (0);
}
- file_handle->fallocate = NULL;
+ file_handle->fh_allocate = NULL;
WT_WRITE_BARRIER();
return (ENOTSUP);
}
diff --git a/src/os_posix/os_fs.c b/src/os_posix/os_fs.c
index 5565076d586..c05f75f2bd5 100644
--- a/src/os_posix/os_fs.c
+++ b/src/os_posix/os_fs.c
@@ -228,7 +228,7 @@ __posix_file_advise(WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session,
* handle method to prevent future calls.
*/
if (ret == EINVAL) {
- file_handle->fadvise = NULL;
+ file_handle->fh_advise = NULL;
return (ENOTSUP);
}
@@ -623,31 +623,31 @@ directory_open:
* interesting.
*/
if (!pfh->direct_io)
- file_handle->fadvise = __posix_file_advise;
+ file_handle->fh_advise = __posix_file_advise;
#endif
- file_handle->fallocate = __wt_posix_file_fallocate;
- file_handle->lock = __posix_file_lock;
+ file_handle->fh_allocate = __wt_posix_file_fallocate;
+ file_handle->fh_lock = __posix_file_lock;
#ifdef WORDS_BIGENDIAN
/*
* The underlying objects are little-endian, mapping objects isn't
* currently supported on big-endian systems.
*/
#else
- file_handle->map = __wt_posix_map;
+ file_handle->fh_map = __wt_posix_map;
#ifdef HAVE_POSIX_MADVISE
- file_handle->map_discard = __wt_posix_map_discard;
- file_handle->map_preload = __wt_posix_map_preload;
+ file_handle->fh_map_discard = __wt_posix_map_discard;
+ file_handle->fh_map_preload = __wt_posix_map_preload;
#endif
- file_handle->unmap = __wt_posix_unmap;
+ file_handle->fh_unmap = __wt_posix_unmap;
#endif
- file_handle->read = __posix_file_read;
- file_handle->size = __posix_file_size;
- file_handle->sync = __posix_file_sync;
+ file_handle->fh_read = __posix_file_read;
+ file_handle->fh_size = __posix_file_size;
+ file_handle->fh_sync = __posix_file_sync;
#ifdef HAVE_SYNC_FILE_RANGE
- file_handle->sync_nowait = __posix_file_sync_nowait;
+ file_handle->fh_sync_nowait = __posix_file_sync_nowait;
#endif
- file_handle->truncate = __posix_file_truncate;
- file_handle->write = __posix_file_write;
+ file_handle->fh_truncate = __posix_file_truncate;
+ file_handle->fh_write = __posix_file_write;
*file_handlep = file_handle;
@@ -689,16 +689,16 @@ __wt_os_posix(WT_SESSION_IMPL *session)
WT_RET(__wt_calloc_one(session, &file_system));
/* Initialize the POSIX jump table. */
- file_system->directory_list = __wt_posix_directory_list;
- file_system->directory_list_free = __wt_posix_directory_list_free;
+ file_system->fs_directory_list = __wt_posix_directory_list;
+ file_system->fs_directory_list_free = __wt_posix_directory_list_free;
#ifdef __linux__
- file_system->directory_sync = __posix_directory_sync;
+ file_system->fs_directory_sync = __posix_directory_sync;
#endif
- file_system->exist = __posix_fs_exist;
- file_system->open_file = __posix_open_file;
- file_system->remove = __posix_fs_remove;
- file_system->rename = __posix_fs_rename;
- file_system->size = __posix_fs_size;
+ file_system->fs_exist = __posix_fs_exist;
+ file_system->fs_open_file = __posix_open_file;
+ file_system->fs_remove = __posix_fs_remove;
+ file_system->fs_rename = __posix_fs_rename;
+ file_system->fs_size = __posix_fs_size;
file_system->terminate = __posix_terminate;
/* Switch it into place. */
diff --git a/src/os_posix/os_map.c b/src/os_posix/os_map.c
index 7fde4037250..9cdb58b95c8 100644
--- a/src/os_posix/os_map.c
+++ b/src/os_posix/os_map.c
@@ -40,7 +40,7 @@ __wt_posix_map(WT_FILE_HANDLE *fh, WT_SESSION *wt_session,
* underneath us, our caller needs to ensure consistency of the mapped
* region vs. any other file activity.
*/
- WT_RET(fh->size(fh, wt_session, &file_size));
+ WT_RET(fh->fh_size(fh, wt_session, &file_size));
len = (size_t)file_size;
(void)__wt_verbose(session, WT_VERB_HANDLEOPS,
diff --git a/src/os_win/os_fs.c b/src/os_win/os_fs.c
index 33e281bf8ae..c4a1235b61b 100644
--- a/src/os_win/os_fs.c
+++ b/src/os_win/os_fs.c
@@ -498,21 +498,21 @@ directory_open:
WT_ERR(__wt_strdup(session, name, &file_handle->name));
file_handle->close = __win_file_close;
- file_handle->lock = __win_file_lock;
+ file_handle->fh_lock = __win_file_lock;
#ifdef WORDS_BIGENDIAN
/*
* The underlying objects are little-endian, mapping objects isn't
* currently supported on big-endian systems.
*/
#else
- file_handle->map = __wt_win_map;
- file_handle->unmap = __wt_win_unmap;
+ file_handle->fh_map = __wt_win_map;
+ file_handle->fh_unmap = __wt_win_unmap;
#endif
- file_handle->read = __win_file_read;
- file_handle->size = __win_file_size;
- file_handle->sync = __win_file_sync;
- file_handle->truncate = __win_file_truncate;
- file_handle->write = __win_file_write;
+ file_handle->fh_read = __win_file_read;
+ file_handle->fh_size = __win_file_size;
+ file_handle->fh_sync = __win_file_sync;
+ file_handle->fh_truncate = __win_file_truncate;
+ file_handle->fh_write = __win_file_write;
*file_handlep = file_handle;
@@ -552,13 +552,13 @@ __wt_os_win(WT_SESSION_IMPL *session)
WT_RET(__wt_calloc_one(session, &file_system));
/* Initialize the Windows jump table. */
- file_system->directory_list = __wt_win_directory_list;
- file_system->directory_list_free = __wt_win_directory_list_free;
- file_system->exist = __win_fs_exist;
- file_system->open_file = __win_open_file;
- file_system->remove = __win_fs_remove;
- file_system->rename = __win_fs_rename;
- file_system->size = __wt_win_fs_size;
+ file_system->fs_directory_list = __wt_win_directory_list;
+ file_system->fs_directory_list_free = __wt_win_directory_list_free;
+ file_system->fs_exist = __win_fs_exist;
+ file_system->fs_open_file = __win_open_file;
+ file_system->fs_remove = __win_fs_remove;
+ file_system->fs_rename = __win_fs_rename;
+ file_system->fs_size = __wt_win_fs_size;
file_system->terminate = __win_terminate;
/* Switch it into place. */