Whamcloud - gitweb
Add ZFS detection to libblkid
authorRicardo M. Correia <Ricardo.M.Correia@Sun.COM>
Fri, 30 May 2008 18:20:47 +0000 (19:20 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 3 Jun 2008 01:09:08 +0000 (21:09 -0400)
commitc9bad3ce1ac50e317adef1400458e6e30d0be20a
tree9c0d25a2c55188dee667d5b2fce1dbd6be2253a0
parent491d8bc3e0fafda6cbb41e76549c620eb700f650
Add ZFS detection to libblkid

This patch adds ZFS filesystem detection to libblkid.

It probes for VDEV_BOOT_MAGIC in the first 2 ZFS labels in big-endian
and little-endian formats.
Unfortunately the probe table doesn't support probing from the end of
the device, otherwise we could also probe in the 3rd and 4th labels (in
case the first 2 labels were accidentally overwritten)..

Eventually we would set the UUID from the ZFS pool GUID and the LABEL tag
from the pool name, but that requires parsing an XDR encoding of the pool
configuration which is not trivial.

Signed-off-by: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/blkid/probe.c