fix: Uber block label not always found for aux vdevs
commit52cee9a3eb0a691ce915a6f46d23f575351d8b4d
authorAmeer Hamza <ahamza@ixsystems.com>
Thu, 4 Jan 2024 14:02:50 +0000 (4 19:02 +0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 29 Jan 2024 22:53:29 +0000 (29 14:53 -0800)
tree949d7dfd29938d4144829fc54230f73a10a507a2
parent2006ac1f4a52419d08641324ba56ecc5d0bbaf6f
fix: Uber block label not always found for aux vdevs

When spare or l2cache (aux) vdev is added during pool creation,
spa->spa_uberblock is not dumped until that point. Subsequently,
the aux label is never synchronized after its initial creation,
resulting in the uberblock label remaining undumped. The uberblock
is crucial for lib_blkid in identifying the ZFS partition type. To
address this issue, we now ensure sync of the uberblock label once
if it's not dumped initially.

Reviewed-by: Umer Saleem <usaleem@ixsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Closes #15737
include/sys/spa_impl.h
module/zfs/vdev_label.c