freebsd-dev/sys/cddl/boot/zfs
Allan Jude 4deb8929ea 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
2016-08-01 19:37:43 +00:00
..
blkptr.c MFV r267565: 2014-07-01 06:43:15 +00:00
fletcher.c
lz4.c Use netinet/in.h to avoid include/arpa dependency for DIRDEPS_BUILD. 2016-05-26 23:20:17 +00:00
lzjb.c
README MFV r267565: 2014-07-01 06:43:15 +00:00
sha256.c
zfsimpl.h Make boot code and loader check for unsupported ZFS feature flags 2016-08-01 19:37:43 +00:00
zfssubr.c MFV r267565: 2014-07-01 06:43:15 +00:00
zle.c

$FreeBSD$

This directory contains various files derived from CDDL sources that
are used by the ZFS bootstrap:

    fletcher.c			checksum support
    sha256.c			checksum support
    lz4.c			compression support
    lzjb.c			compression support
    blkptr.c			ZFS embedded-data block pointers support
    zfssubr.c			checksum, compression and raidz support
    zfsimpl.h			mostly describing the physical layout

The files fletcher.c, lzjb.c, lz4.c, sha256.c and blkptr.c are largely identical
to the ZFS base code (with write support removed) and could be shared but that
might complicate future imports from Illumos.