diff options
author | Keith Bostic <keith@wiredtiger.com> | 2014-10-07 16:24:47 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2014-10-07 16:24:47 -0400 |
commit | c5b71e52b49c50ab51054a089dbdadfaf9416fac (patch) | |
tree | 2f1a41d368d5a9945b2a1a75925966686f66fb5c /src/include/os.h | |
parent | 2ddf31875a1f9e91cea08ac4a5ba4ca13b6c1c23 (diff) | |
download | mongo-c5b71e52b49c50ab51054a089dbdadfaf9416fac.tar.gz |
Ftruncate is incompatible with file mapping on Windows, return EBUSY from
the OS layer if a file handle has a mapping and ftruncate is called.
Change exclusive operations to close all open connection handles for a file
object before performing the operation.
Reference #1254.
Diffstat (limited to 'src/include/os.h')
-rw-r--r-- | src/include/os.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/include/os.h b/src/include/os.h index 5123d9c0013..13e9caca99d 100644 --- a/src/include/os.h +++ b/src/include/os.h @@ -43,10 +43,13 @@ (t1).tv_nsec == (t2).tv_nsec ? 0 : 1 : 1) struct __wt_fh { - u_int refcnt; /* Reference count */ + char *name; /* File name */ TAILQ_ENTRY(__wt_fh) q; /* List of open handles */ - char *name; /* File name */ + u_int refcnt; /* Reference count */ + u_int ref_mapped; /* Mapped reference count */ + + WT_SPINLOCK lock; /* Handle lock */ int fd; /* POSIX file handle */ wt_off_t size; /* File size */ |