HomeFreeBSD

libzutil: don't read extraneous data in zpool_read_label

Description

libzutil: don't read extraneous data in zpool_read_label

zpool_read_label doesn't need the full labels including uberblocks. It
only needs the vdev_phys_t. This reduces by half the amount of data
read to check for a label, speeding up "zpool import", "zpool
labelclear", etc.

Originally committed as
https://cgit.freebsd.org/src/commit/?id=63f8025d6acab1b334373ddd33f940a69b3b54cc

Obtained from: FreeBSD
Sponsored by: Spectra Logic Corp, Axcient
Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alek Pinchuk <apinchuk@axcient.com>
Signed-off-by: Alan Somers <asomers@gmail.com>
Closes #11467

Details

Provenance
asomersAuthored on Jan 13 2021, 4:30 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jan 21 2021, 7:18 PM
Parents
rG83b91ae1a4fa: Linux 5.10 compat: restore custom uio_prefaultpages()
Branches
Unknown
Tags
Unknown