diff options
author | Victor Latushkin <Victor.Latushkin@Sun.COM> | 2009-10-25 05:02:45 +0300 |
---|---|---|
committer | Victor Latushkin <Victor.Latushkin@Sun.COM> | 2009-10-25 05:02:45 +0300 |
commit | e4161df661b4cdf3f70df5b2ecc0a040c89d17d1 (patch) | |
tree | c7bb7f8ce0244ec670b2ff517b0b027b9cdbe433 /usr/src | |
parent | 530f2c280d739b194cfbb75f25352b75bb99b4b2 (diff) | |
download | illumos-joyent-e4161df661b4cdf3f70df5b2ecc0a040c89d17d1.tar.gz |
6892882 zdb -ddddd prints garbage from stack between dataset summary and rootbp
6892867 zdb can loop forever in dump_history()
6771708 zdb: Assertion failed: fill == bp->blk_fill (0x0 == 0x25), file ../zdb.c, line 671
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/zdb/zdb.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr/src/cmd/zdb/zdb.c b/usr/src/cmd/zdb/zdb.c index d58332a969..22b5e8e8e4 100644 --- a/usr/src/cmd/zdb/zdb.c +++ b/usr/src/cmd/zdb/zdb.c @@ -540,8 +540,7 @@ dump_history(spa_t *spa) { nvlist_t **events = NULL; char buf[SPA_MAXBLOCKSIZE]; - uint64_t resid, off = 0; - uint64_t len = sizeof (buf); + uint64_t resid, len, off = 0; uint_t num = 0; int error; time_t tsec; @@ -550,6 +549,8 @@ dump_history(spa_t *spa) char internalstr[MAXPATHLEN]; do { + len = sizeof (buf); + if ((error = spa_history_get(spa, &off, &len, buf)) != 0) { (void) fprintf(stderr, "Unable to read history: " "error %d\n", error); @@ -673,7 +674,7 @@ static int visit_indirect(spa_t *spa, const dnode_phys_t *dnp, blkptr_t *bp, const zbookmark_t *zb) { - int err; + int err = 0; if (bp->blk_birth == 0) return (0); @@ -1203,7 +1204,7 @@ dump_dir(objset_t *os) nicenum(refdbytes, numbuf); if (verbosity >= 4) { - (void) sprintf(blkbuf + strlen(blkbuf), ", rootbp "); + (void) sprintf(blkbuf, ", rootbp "); (void) sprintf_blkptr(blkbuf + strlen(blkbuf), BP_SPRINTF_LEN - strlen(blkbuf), os->os_rootbp); } else { |