HomeFreeBSD

MFV r316862: 6410 teach zdb to perform object lookups by path

Description

MFV r316862: 6410 teach zdb to perform object lookups by path

illumos/illumos-gate@ed61ec1da9132e570b0853386d0f78a32f852cd2
https://github.com/illumos/illumos-gate/commit/ed61ec1da9132e570b0853386d0f78a32f852cd2

FreeBSD note: this commit does not update the manual page.
The original change includes conversion of the manual page from *roff format
to mandoc format. So, it is hard to extract the content change from
that. I am going to replace our zdb manual page, which is an earlier
independent conversion, with a slighly modified version of the upstream page.

https://www.illumos.org/issues/6410

This is primarily intended to ease debugging & testing ZFS when one is only
interested in things like the on-disk location of a specific object's blocks,
but doesn't know their object id. This allows doing things like the following
(FreeBSD-based example):
        # zpool create -f foo da0
        # dd if=/dev/zero of=/foo/1 bs=1M count=4 >/dev/null 2>&1
        # zpool export foo
        # zdb -vvvvv -o "ZFS plain file" foo /1
        Object  lvl   iblk   dblk  dsize  lsize   %full  type
             8    2    16K   128K  3.99M     4M  100.00  ZFS plain file (K=inherit) (Z=inherit)
                                            168   bonus  System attributes
        dnode flags: USED_BYTES USERUSED_ACCOUNTED
        dnode maxblkid: 31
        path    /1
        uid     0
        gid     0
        atime   Thu Apr 23 22:45:32 2015
        mtime   Thu Apr 23 22:45:32 2015
        ctime   Thu Apr 23 22:45:32 2015
        crtime  Thu Apr 23 22:45:32 2015
        gen     7
        mode    100644
        size    4194304
        parent  4
        links   1
        pflags  40800000004
        Indirect blocks:
              0 L1  DVA[0]=<0:c19200:600> DVA[1]=<0:10800019200:600> [L1 ZFS
plain file] fletcher4 lz4 LE contiguous unique double size=4000L/200P birth=7L/

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Will Andrews <will@freebsd.org>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Yuri Pankov <yuri.pankov@nexenta.com>

MFC after: 3 weeks

Details

Provenance
avgAuthored on
Reviewer
matthew
Parents
rS324342: Add updating for armv7 and bump FreeBSD_version.
Branches
Unknown
Tags
Unknown