diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/block/block_ext.c | 2 | ||||
-rw-r--r-- | src/block/block_read.c | 6 | ||||
-rw-r--r-- | src/btree/bt_handle.c | 2 | ||||
-rw-r--r-- | src/btree/bt_io.c | 2 | ||||
-rw-r--r-- | src/btree/bt_slvg.c | 4 | ||||
-rw-r--r-- | src/btree/bt_vrfy_dsk.c | 4 | ||||
-rw-r--r-- | src/include/flags.h | 2 |
7 files changed, 12 insertions, 10 deletions
diff --git a/src/block/block_ext.c b/src/block/block_ext.c index d593537446b..cdef1682faf 100644 --- a/src/block/block_ext.c +++ b/src/block/block_ext.c @@ -283,7 +283,7 @@ __wt_block_misplaced(WT_SESSION_IMPL *session, * Don't check during the salvage read phase, we might be reading an * already freed overflow page. */ - if (F_ISSET(session, WT_SESSION_SALVAGE_CORRUPT_OK)) + if (F_ISSET(session, WT_SESSION_QUIET_CORRUPT_FILE)) return (0); /* diff --git a/src/block/block_read.c b/src/block/block_read.c index 0d631396b41..9f7c869dd38 100644 --- a/src/block/block_read.c +++ b/src/block/block_read.c @@ -200,7 +200,7 @@ __wt_block_read_off(WT_SESSION_IMPL *session, WT_BLOCK *block, if (page_cksum == cksum) return (0); - if (!F_ISSET(session, WT_SESSION_SALVAGE_CORRUPT_OK)) + if (!F_ISSET(session, WT_SESSION_QUIET_CORRUPT_FILE)) __wt_errx(session, "read checksum error for %" PRIu32 "B block at " "offset %" PRIuMAX ": calculated block checksum " @@ -208,7 +208,7 @@ __wt_block_read_off(WT_SESSION_IMPL *session, WT_BLOCK *block, "of %" PRIu32, size, (uintmax_t)offset, page_cksum, cksum); } else - if (!F_ISSET(session, WT_SESSION_SALVAGE_CORRUPT_OK)) + if (!F_ISSET(session, WT_SESSION_QUIET_CORRUPT_FILE)) __wt_errx(session, "read checksum error for %" PRIu32 "B block at " "offset %" PRIuMAX ": block header checksum " @@ -218,6 +218,6 @@ __wt_block_read_off(WT_SESSION_IMPL *session, WT_BLOCK *block, /* Panic if a checksum fails during an ordinary read. */ return (block->verify || - F_ISSET(session, WT_SESSION_SALVAGE_CORRUPT_OK) ? + F_ISSET(session, WT_SESSION_QUIET_CORRUPT_FILE) ? WT_ERROR : __wt_illegal_value(session, block->name)); } diff --git a/src/btree/bt_handle.c b/src/btree/bt_handle.c index 13aa4275bdb..f288c8b01e4 100644 --- a/src/btree/bt_handle.c +++ b/src/btree/bt_handle.c @@ -404,10 +404,12 @@ __wt_btree_tree_open( * decrypt, we read the object successfully but we can't decrypt it, and * we want to fail gracefully. */ + F_SET(session, WT_SESSION_QUIET_CORRUPT_FILE); WT_ERR(__wt_bt_read(session, &dsk, addr, addr_size)); WT_ERR(__wt_scr_alloc(session, 0, &tmp)); WT_ERR(bm->addr_string(bm, session, tmp, addr, addr_size)); WT_ERR(__wt_verify_dsk(session, tmp->data, &dsk)); + F_CLR(session, WT_SESSION_QUIET_CORRUPT_FILE); /* * Build the in-memory version of the page. Clear our local reference to diff --git a/src/btree/bt_io.c b/src/btree/bt_io.c index 735514d478c..42c83bef2a8 100644 --- a/src/btree/bt_io.c +++ b/src/btree/bt_io.c @@ -148,7 +148,7 @@ __wt_bt_read(WT_SESSION_IMPL *session, if (0) { corrupt: if (F_ISSET(btree, WT_BTREE_VERIFY) || - F_ISSET(session, WT_SESSION_SALVAGE_CORRUPT_OK)) + F_ISSET(session, WT_SESSION_QUIET_CORRUPT_FILE)) ret = WT_ERROR; else { __wt_err(session, ret == 0 ? WT_ERROR : ret, fail_msg); diff --git a/src/btree/bt_slvg.c b/src/btree/bt_slvg.c index f41a5d86e9f..22d4948e07d 100644 --- a/src/btree/bt_slvg.c +++ b/src/btree/bt_slvg.c @@ -197,9 +197,9 @@ __wt_bt_salvage(WT_SESSION_IMPL *session, WT_CKPT *ckptbase, const char *cfg[]) * Turn off read checksum and verification error messages while we're * reading the file, we expect to see corrupted blocks. */ - F_SET(session, WT_SESSION_SALVAGE_CORRUPT_OK); + F_SET(session, WT_SESSION_QUIET_CORRUPT_FILE); ret = __slvg_read(session, ss); - F_CLR(session, WT_SESSION_SALVAGE_CORRUPT_OK); + F_CLR(session, WT_SESSION_QUIET_CORRUPT_FILE); WT_ERR(ret); /* diff --git a/src/btree/bt_vrfy_dsk.c b/src/btree/bt_vrfy_dsk.c index bc704190791..095e439786c 100644 --- a/src/btree/bt_vrfy_dsk.c +++ b/src/btree/bt_vrfy_dsk.c @@ -26,13 +26,13 @@ static int __verify_dsk_row( WT_SESSION_IMPL *, const char *, const WT_PAGE_HEADER *); #define WT_ERR_VRFY(session, ...) do { \ - if (!(F_ISSET(session, WT_SESSION_SALVAGE_CORRUPT_OK))) \ + if (!(F_ISSET(session, WT_SESSION_QUIET_CORRUPT_FILE))) \ __wt_errx(session, __VA_ARGS__); \ goto err; \ } while (0) #define WT_RET_VRFY(session, ...) do { \ - if (!(F_ISSET(session, WT_SESSION_SALVAGE_CORRUPT_OK))) \ + if (!(F_ISSET(session, WT_SESSION_QUIET_CORRUPT_FILE))) \ __wt_errx(session, __VA_ARGS__); \ return (WT_ERROR); \ } while (0) diff --git a/src/include/flags.h b/src/include/flags.h index 675ede9a8a0..2afe574a132 100644 --- a/src/include/flags.h +++ b/src/include/flags.h @@ -54,7 +54,7 @@ #define WT_SESSION_NO_DATA_HANDLES 0x00000800 #define WT_SESSION_NO_LOGGING 0x00001000 #define WT_SESSION_NO_SCHEMA_LOCK 0x00002000 -#define WT_SESSION_SALVAGE_CORRUPT_OK 0x00004000 +#define WT_SESSION_QUIET_CORRUPT_FILE 0x00004000 #define WT_SESSION_SERVER_ASYNC 0x00008000 #define WT_SKIP_UPDATE_ERR 0x00000002 #define WT_SKIP_UPDATE_RESTORE 0x00000004 |