diff options
author | Alan Somers <asomers@gmail.com> | 2017-04-13 14:22:51 -0700 |
---|---|---|
committer | Matthew Ahrens <mahrens@delphix.com> | 2017-04-13 20:44:20 -0700 |
commit | e548d2fa41d1baa06662ed9abbb8bcec86e27dd9 (patch) | |
tree | 52e9e95fcebd92d1ec12cc69cf5aaa9e12bcd9ad /usr/src | |
parent | adc68ba91854584a470224cdb128a8e1ba16b41b (diff) | |
download | illumos-joyent-e548d2fa41d1baa06662ed9abbb8bcec86e27dd9.tar.gz |
7900 zdb shouldn't print the path of a znode at verbosity < 5
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/zdb/zdb.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/usr/src/cmd/zdb/zdb.c b/usr/src/cmd/zdb/zdb.c index 8337982284..f575884505 100644 --- a/usr/src/cmd/zdb/zdb.c +++ b/usr/src/cmd/zdb/zdb.c @@ -1737,23 +1737,19 @@ dump_znode(objset_t *os, uint64_t object, void *data, size_t size) return; } - error = zfs_obj_to_path(os, object, path, sizeof (path)); - if (error != 0) { - (void) snprintf(path, sizeof (path), "\?\?\?<object#%llu>", - (u_longlong_t)object); - } - if (dump_opt['d'] < 3) { - (void) printf("\t%s\n", path); - (void) sa_handle_destroy(hdl); - return; - } - z_crtime = (time_t)crtm[0]; z_atime = (time_t)acctm[0]; z_mtime = (time_t)modtm[0]; z_ctime = (time_t)chgtm[0]; - (void) printf("\tpath %s\n", path); + if (dump_opt['d'] > 4) { + error = zfs_obj_to_path(os, object, path, sizeof (path)); + if (error != 0) { + (void) snprintf(path, sizeof (path), + "\?\?\?<object#%llu>", (u_longlong_t)object); + } + (void) printf("\tpath %s\n", path); + } dump_uidgid(os, uid, gid); (void) printf("\tatime %s", ctime(&z_atime)); (void) printf("\tmtime %s", ctime(&z_mtime)); |