Jim Klimov
2013-11-12 11:09:29 UTC
I'm studying zfs on Solaris 10.I read ZFS On-Disk Specification and try to find my data, but i found something wrong.
The dnode_phys_t of object_phys_t don't point to an array of dnode_phys_t, it point to an array of blkptr_t.
I am not ready to go into such depths responsibly, but can offer myThe dnode_phys_t of object_phys_t don't point to an array of dnode_phys_t, it point to an array of blkptr_t.
understanding below. Really, this is better asked on the illumos ZFS
list (Oracle's one is pretty quiet). I might guess however that many
objects in ZFS are extensible (with "bonus data") which is interpreted
based on the value of some flag in the main standard structure.
AFAIK, the file storage (the metadata tree below a POSIX directory
entry) contains an optional number of levels of dnodes (up to 16Kb)
which include blkptr_t's that point to lower-level blocks (either
another layer of dnodes, or in case of L0 blocks - to "userdata").
This per-file tree of dnodes only depends on the size of file and
the number of blocks needed to allocate its data, and is (re)built
automatically when the file is written to.
Does it depend on the version of ZFS or Solaris?
Such basic things - should not. While the on-disk spec is old (2006)and many things were expanded (differently in later branches of
proprietary and open ZFS implementations), the foundations should
be the same for the sake of backward compatibility (new code can
read old pools).
HTH, and more luck on the list,
//Jim Klimov