summaryrefslogtreecommitdiff
path: root/src/block
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2016-03-25 16:11:24 -0400
committerKeith Bostic <keith@wiredtiger.com>2016-03-25 16:11:24 -0400
commita167c84fbefa2dea8539aaa68223f3bc3b944b55 (patch)
treee660f4e96fbb6b4e0184b9cc53732f9be3ad554d /src/block
parent3ad7ced19bd1bd622c0628226198eadd23021822 (diff)
downloadmongo-a167c84fbefa2dea8539aaa68223f3bc3b944b55.tar.gz
WT-2330: in-memory configurations should not create on-disk collection files
The __wt_open() "dio_type" has become a general file-type, it should always be specified. It remains a flag, because it shares definitions with WT_CONNECTION_IMPL fields, holding flags set during configuration. Remove the set of the file-type to WT_FILE_TYPE_CHECKPOINT in the block manager code; instead, test for a read-only data file in the open code. This means WT_FILE_TYPE_CHECKPOINT is purely a configuration flag, it's not used inside WiredTiger to specify the type of a file being opened. Review __wt_open calls, add file-types where not specified, add readonly where appopriate. Sue's review comment, change u_int flags to __wt_open to uint32_t.
Diffstat (limited to 'src/block')
-rw-r--r--src/block/block_open.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/block/block_open.c b/src/block/block_open.c
index 4bc75c36e86..50e44aceea9 100644
--- a/src/block/block_open.c
+++ b/src/block/block_open.c
@@ -157,6 +157,8 @@ __wt_block_open(WT_SESSION_IMPL *session,
WT_DECL_RET;
uint64_t bucket, hash;
+ WT_UNUSED(readonly);
+
WT_RET(__wt_verbose(session, WT_VERB_BLOCK, "open: %s", filename));
conn = S2C(session);
@@ -226,9 +228,7 @@ __wt_block_open(WT_SESSION_IMPL *session,
#endif
/* Open the underlying file handle. */
- WT_ERR(__wt_open(session, filename,
- readonly ? WT_FILE_TYPE_CHECKPOINT : WT_FILE_TYPE_DATA,
- 0, &block->fh));
+ WT_ERR(__wt_open(session, filename, WT_FILE_TYPE_DATA, 0, &block->fh));
/* Initialize the live checkpoint's lock. */
WT_ERR(__wt_spin_init(session, &block->live_lock, "block manager"));