diff options
author | Keith Bostic <keith@wiredtiger.com> | 2013-01-05 09:17:43 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2013-01-05 09:17:43 -0500 |
commit | 58c3d9b02a75c9a9a48025ffef9b4b5fa42326af (patch) | |
tree | 55a5856ba21640b050ac2d37ece7600fa18d83a1 | |
parent | 2e8475d8e06c289419e23141de12d38f2d78b739 (diff) | |
download | mongo-58c3d9b02a75c9a9a48025ffef9b4b5fa42326af.tar.gz |
Don't output the list of file/checkpoint ranges that weren't verified
unless verbose is configured, it's completely useless in most cases
because we quit verification as soon as we find an error.
-rw-r--r-- | src/block/block_vrfy.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/src/block/block_vrfy.c b/src/block/block_vrfy.c index 8556a953171..702064afbcf 100644 --- a/src/block/block_vrfy.c +++ b/src/block/block_vrfy.c @@ -343,8 +343,7 @@ __verify_filefrag_add(WT_SESSION_IMPL *session, static int __verify_filefrag_chk(WT_SESSION_IMPL *session, WT_BLOCK *block) { - WT_DECL_RET; - uint64_t first, last; + uint64_t count, first, last; /* If there's nothing to verify, it was a fast run. */ if (block->frags == 0) @@ -372,7 +371,7 @@ __verify_filefrag_chk(WT_SESSION_IMPL *session, WT_BLOCK *block) * time after setting the clear bit(s) we found: it's simpler and this * isn't supposed to happen a lot. */ - for (;;) { + for (count = 0;; ++count) { if (__bit_ffc(block->fragfile, block->frags, &first) != 0) break; __bit_set(block->fragfile, first); @@ -382,13 +381,19 @@ __verify_filefrag_chk(WT_SESSION_IMPL *session, WT_BLOCK *block) __bit_set(block->fragfile, last); } + if (!WT_VERBOSE_ISSET(session, verify)) + continue; + __wt_errx(session, "file range %" PRIuMAX "-%" PRIuMAX " never verified", (uintmax_t)WT_FRAG_TO_OFF(block, first), (uintmax_t)WT_FRAG_TO_OFF(block, last)); - ret = WT_ERROR; } - return (ret); + if (count == 0) + return (0); + + __wt_errx(session, "file ranges never verified: %" PRIuMAX, count); + return (WT_ERROR); } /* @@ -442,8 +447,7 @@ __verify_ckptfrag_add( static int __verify_ckptfrag_chk(WT_SESSION_IMPL *session, WT_BLOCK *block) { - WT_DECL_RET; - uint64_t first, last; + uint64_t count, first, last; /* * The checkpoint fragment memory is only allocated as a checkpoint @@ -458,7 +462,7 @@ __verify_ckptfrag_chk(WT_SESSION_IMPL *session, WT_BLOCK *block) * after clearing the set bit(s) we found: it's simpler and this isn't * supposed to happen a lot. */ - for (;;) { + for (count = 0;; ++count) { if (__bit_ffs(block->fragckpt, block->frags, &first) != 0) break; __bit_clear(block->fragckpt, first); @@ -468,11 +472,19 @@ __verify_ckptfrag_chk(WT_SESSION_IMPL *session, WT_BLOCK *block) __bit_clear(block->fragckpt, last); } + if (!WT_VERBOSE_ISSET(session, verify)) + continue; + __wt_errx(session, "checkpoint range %" PRIuMAX "-%" PRIuMAX " never verified", (uintmax_t)WT_FRAG_TO_OFF(block, first), (uintmax_t)WT_FRAG_TO_OFF(block, last)); - ret = WT_ERROR; } - return (ret); + + if (count == 0) + return (0); + + __wt_errx(session, + "checkpoint ranges never verified: %" PRIuMAX, count); + return (WT_ERROR); } |