freebsd-dev/sys/boot/zfs
Toomas Soome e41fab8d40 loader: zfs reader should check all labels
The current zfs reader is only checking first label from each device, however,
we do have 4 labels on device and we should check all 4 to be protected
against disk failures and incomplete label updates.

The difficulty is about the fact that 2 label copies are in front of the
pool data, and 2 are at the end, which means, we have to know the size of
the pool data area.

Since we have now the mechanism from common/disk.c to use the partition
information, it does help us in this task; however, there are still some
corner cases.

Namely, if the pool is created without partition, directly on the disk,
and firmware will give us the wrong size for the disk, we only can check
the first two label copies.

Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D10203
2017-04-06 18:17:29 +00:00
..
devicename_stubs.c
libzfs.h loader: zfs reader should check all labels 2017-04-06 18:17:29 +00:00
Makefile Disable loop unrolling in skein for sys/boot 2016-10-06 03:32:30 +00:00
Makefile.depend META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
zfs.c sys: Replace zero with NULL for pointers. 2017-02-22 02:35:59 +00:00
zfsimpl.c loader: zfs reader should check all labels 2017-04-06 18:17:29 +00:00