Skip to content

Commit

Permalink
WT-2258: Add configuration support for a direct_io=(data) option.
Browse files Browse the repository at this point in the history
  • Loading branch information
keithbostic committed Dec 2, 2015
1 parent 6810f38 commit 23d5f86
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/format/config.h
Expand Up @@ -124,7 +124,7 @@ static CONFIG c[] = {

{ "data_source",
"data source (file | helium | kvsbdb | lsm | table)",
C_IGNORE | C_STRING, 0, 0, 0, NULL, &g.c_data_source },
C_IGNORE|C_STRING, 0, 0, 0, NULL, &g.c_data_source },

{ "delete_pct",
"percent operations that are deletes",
Expand All @@ -134,6 +134,10 @@ static CONFIG c[] = {
"if values are dictionary compressed", /* 20% */
C_BOOL, 20, 0, 0, &g.c_dictionary, NULL },

{ "direct_io",
"if direct I/O is configured for data objects", /* 0% */
C_IGNORE, 0, 0, 1, &g.c_direct_io, NULL },

{ "encryption",
"type of encryption (none | rotn-7)",
C_IGNORE|C_STRING, 0, 0, 0, NULL, &g.c_encryption },
Expand Down
1 change: 1 addition & 0 deletions test/format/format.h
Expand Up @@ -185,6 +185,7 @@ typedef struct {
char *c_data_source;
uint32_t c_delete_pct;
uint32_t c_dictionary;
uint32_t c_direct_io;
uint32_t c_evict_max;
uint32_t c_firstfit;
char *c_file_type;
Expand Down
3 changes: 3 additions & 0 deletions test/format/wts.c
Expand Up @@ -184,6 +184,9 @@ wts_open(const char *home, int set_api, WT_CONNECTION **connp)

p += snprintf(p, REMAIN(p, end), ",mmap=%d", g.c_mmap ? 1 : 0);

if (g.c_direct_io)
p += snprintf(p, REMAIN(p, end), ",direct_io=(data)");

if (g.c_data_extend)
p += snprintf(p, REMAIN(p, end), ",file_extend=(data=8MB)");

Expand Down

0 comments on commit 23d5f86

Please sign in to comment.