]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r303630 (by allanjude):
authormav <mav@FreeBSD.org>
Wed, 26 Jul 2017 14:55:47 +0000 (14:55 +0000)
committermav <mav@FreeBSD.org>
Wed, 26 Jul 2017 14:55:47 +0000 (14:55 +0000)
commit918ad7548bd0d0ef669c5a746dec8cc0a8b04195
treea03665b400c71934209bb0a480f5a327417e4648
parent4faf693a4f722707fc4d3d5d8101c206cc858472
MFC r303630 (by allanjude):
Make boot code and loader check for unsupported ZFS feature flags

OpenZFS uses feature flags instead of a zpool version number to track
features since the split from Oracle. In addition to avoiding confusion
on ZFS vs OpenZFS version numbers, this also allows features to be added
to different operating systems that use OpenZFS in different order.

The previous zfs boot code (gptzfsboot) and loader (zfsloader) blindly
tries to read the pool, and if failed provided only a vague error message.

With this change, both the boot code and loader check the MOS features
list in the ZFS label and compare it against the list of features that
the loader supports. If any unsupported feature is active, the pool is
not considered as a candidate for booting, and a helpful diagnostic
message is printed to the screen. Features that are merely enabled via
zpool upgrade, but not in use, do not block booting from the pool.

Submitted by:   Toomas Soome <tsoome@me.com>
Reviewed by:    delphij, mav
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D6857
sys/boot/zfs/libzfs.h
sys/boot/zfs/zfs.c
sys/boot/zfs/zfsimpl.c
sys/cddl/boot/zfs/zfsimpl.h