diff options
author | Keith Bostic <keith@wiredtiger.com> | 2014-11-25 08:27:30 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2014-11-25 08:27:30 -0500 |
commit | 202b17982d3e999aa26cdddaaf4f781035a4b102 (patch) | |
tree | bd5367717b9d885351d18d91a6d05907b656fe99 /src/block | |
parent | 539fa4571775990cea2208c50abf466e2e7b94a3 (diff) | |
download | mongo-202b17982d3e999aa26cdddaaf4f781035a4b102.tar.gz |
Do a minimal check on each checkpoint's avail list, read it to ensure
it hasn't been corrupted.
Diffstat (limited to 'src/block')
-rw-r--r-- | src/block/block_vrfy.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/block/block_vrfy.c b/src/block/block_vrfy.c index bfbb06cfe9e..db4e42b79e7 100644 --- a/src/block/block_vrfy.c +++ b/src/block/block_vrfy.c @@ -232,6 +232,22 @@ __wt_verify_ckpt_load( } /* + * We don't need to list of blocks on a checkpoint's avail list, but we + * read it to ensure it wasn't corrupted. We could confirm correctness + * of intermediate avail lists (that is, if they're logically the result + * of the allocations and discards to this point). We don't because the + * only avail list ever used is the one for the last checkpoint, which + * is separately verified by checking it against all of the blocks found + * in the file. + */ + el = &ci->avail; + if (el->offset != WT_BLOCK_INVALID_OFFSET) { + WT_RET(__wt_block_extlist_read( + session, block, el, ci->file_size)); + __wt_block_extlist_free(session, el); + } + + /* * The root page of the checkpoint appears on the alloc list, but not, * at least until the checkpoint is deleted, on a discard list. To * handle this case, remove the root page from the accumulated list of |