summaryrefslogtreecommitdiff
path: root/src/os_posix/os_fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_posix/os_fs.c')
-rw-r--r--src/os_posix/os_fs.c72
1 files changed, 46 insertions, 26 deletions
diff --git a/src/os_posix/os_fs.c b/src/os_posix/os_fs.c
index ab9c82613d6..c05f75f2bd5 100644
--- a/src/os_posix/os_fs.c
+++ b/src/os_posix/os_fs.c
@@ -1,9 +1,29 @@
/*-
- * Copyright (c) 2014-2016 MongoDB, Inc.
- * Copyright (c) 2008-2014 WiredTiger, Inc.
- * All rights reserved.
+ * Public Domain 2014-2016 MongoDB, Inc.
+ * Public Domain 2008-2014 WiredTiger, Inc.
*
- * See the file LICENSE for redistribution information.
+ * This is free and unencumbered software released into the public domain.
+ *
+ * Anyone is free to copy, modify, publish, use, compile, sell, or
+ * distribute this software, either in source code form or as a compiled
+ * binary, for any purpose, commercial or non-commercial, and by any
+ * means.
+ *
+ * In jurisdictions that recognize copyright laws, the author or authors
+ * of this software dedicate any and all copyright interest in the
+ * software to the public domain. We make this dedication for the benefit
+ * of the public at large and to the detriment of our heirs and
+ * successors. We intend this dedication to be an overt act of
+ * relinquishment in perpetuity of all present and future rights to this
+ * software under copyright law.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
#include "wt_internal.h"
@@ -208,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);
}
@@ -603,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;
@@ -669,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. */