]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
zfs: add an option to the bootloader to rewind the ZFS checkpoint
authorMariusz Zaborski <oshogbo@FreeBSD.org>
Tue, 18 Aug 2020 19:48:04 +0000 (19:48 +0000)
committerMariusz Zaborski <oshogbo@FreeBSD.org>
Tue, 18 Aug 2020 19:48:04 +0000 (19:48 +0000)
commit277f38abffc6a8160b5044128b5b2c620fbb970c
tree3bab41fe37fb14ef05b8dfb2b0b1235a2a47ffce
parentad7a0eb189e2aba52f2dcc6b47642a84365b90dd
zfs: add an option to the bootloader to rewind the ZFS checkpoint

The checkpoints are another way of keeping the state of ZFS.
During the rewind, the pool has to be exported.
This makes checkpoints unusable when using ZFS as root.
Add the option to rewind the ZFS checkpoint at the boot time.
If checkpoint exists, a new option for rewinding a checkpoint will appear in
the bootloader menu.
We fully support boot environments.
If the rewind option is selected, the boot loader will show a list of
boot environments that existed before the checkpoint.

Reviewed by: tsoome, allanjude, kevans (ok with high-level overview)
Differential Revision: https://reviews.freebsd.org/D24920
stand/efi/loader/main.c
stand/i386/loader/main.c
stand/libsa/zfs/libzfs.h
stand/libsa/zfs/zfs.c
stand/libsa/zfs/zfsimpl.c
stand/lua/core.lua
stand/lua/menu.lua
sys/cddl/boot/zfs/zfsimpl.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c