Whamcloud - gitweb
blkid: fix ZFS device detection
authorAndreas Dilger <andreas.dilger@intel.com>
Sun, 6 Mar 2016 00:38:31 +0000 (17:38 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 6 Mar 2016 23:11:47 +0000 (18:11 -0500)
commit865dc0d7534ca881dbe1e9fc9fd95792e7f3f0ab
tree857d6a4b609bdd7b9ae5703be6a11b7d458e1ecb
parent0355d6d047884f5ba41ef526fc7d13fba1f6b258
blkid: fix ZFS device detection

While the main blkid functionality is in util-linux, there is still
use for blkid on non-Linux platforms.

Fix the ZFS device detection by looking at multiple uberblocks to
see if any are present, rather than looking for the ZFS boot block
which is not always present.

There are slots for up to 128 uberblocks, but the first 4 are not
written to disk on a newly-formatted filesystem, so check several
of them at different offsets within the uberblock array.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/blkid/probe.c