From 689c0b58ad1d8a2205967bd193a81e03516f46e4 Mon Sep 17 00:00:00 2001 From: Alex Gorrod Date: Thu, 31 Mar 2016 14:45:56 +1100 Subject: 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. --- src/os_posix/os_map.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/os_posix') 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, -- cgit v1.2.1