diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2016-03-31 14:45:56 +1100 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2016-03-31 14:45:56 +1100 |
commit | 689c0b58ad1d8a2205967bd193a81e03516f46e4 (patch) | |
tree | 8e60f41e2a05bcb8995b18d0ed60eafb56f8de65 /src/os_posix/os_map.c | |
parent | 1b44665c66c71f4cd64f360f5620ef6b20b3efe0 (diff) | |
download | mongo-689c0b58ad1d8a2205967bd193a81e03516f46e4.tar.gz |
WT-2330 Move the map handle back into the block structure.
Multiple block structures can share the same file handle. So
saving the map handle into the WT_FH structure means we overwrite
it each time we memory map a region from a different btree.
Diffstat (limited to 'src/os_posix/os_map.c')
-rw-r--r-- | src/os_posix/os_map.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/os_posix/os_map.c b/src/os_posix/os_map.c index 304bb32df31..de28891ffd1 100644 --- a/src/os_posix/os_map.c +++ b/src/os_posix/os_map.c @@ -13,12 +13,15 @@ * Map a file into memory. */ int -__wt_posix_map(WT_SESSION_IMPL *session, WT_FH *fh, void *mapp, size_t *lenp) +__wt_posix_map(WT_SESSION_IMPL *session, + WT_FH *fh, void *mapp, size_t *lenp, void **mappingcookie) { size_t len; wt_off_t file_size; void *map; + WT_UNUSED(mappingcookie); + WT_ASSERT(session, !F_ISSET(S2C(session), WT_CONN_IN_MEMORY)); /* @@ -173,8 +176,11 @@ __wt_posix_map_discard( * Remove a memory mapping. */ int -__wt_posix_map_unmap(WT_SESSION_IMPL *session, WT_FH *fh, void *map, size_t len) +__wt_posix_map_unmap(WT_SESSION_IMPL *session, + WT_FH *fh, void *map, size_t len, void **mappingcookie) { + WT_UNUSED(mappingcookie); + WT_ASSERT(session, !F_ISSET(S2C(session), WT_CONN_IN_MEMORY)); (void)__wt_verbose(session, WT_VERB_HANDLEOPS, |