Turn off zstd on aarch64loader support for zstd and zfs doesn't work for aarch64. Disable itto unbreak the build.
Add zstd support to the boot loader.Add support to the _STANDALONE environment enough bits of the kernelthat we can compile it. We still have a small zstd_shim.c since therewere 3 items that were
Add zstd support to the boot loader.Add support to the _STANDALONE environment enough bits of the kernelthat we can compile it. We still have a small zstd_shim.c since therewere 3 items that were a bit hard to nail down and may be cleaned upin the future. These go hand in hand with a number of commits tosys/sys in the past weeks, should this need be MFCd.Discussed with: mmacy (in review and on IRC/Slack)Reviewed by: freqlabs (on openzfs repo)Differential Revision: https://reviews.freebsd.org/D26218
show more ...
loader: zfs should support bootonce an nextbootbootonce feature is temporary, one time boot, activated by"bectl activate -t BE", "bectl activate -T BE" will reset the bootonce flag.By default, t
loader: zfs should support bootonce an nextbootbootonce feature is temporary, one time boot, activated by"bectl activate -t BE", "bectl activate -T BE" will reset the bootonce flag.By default, the bootonce setting is reset on attempt to boot and the nextboot will use previously active BE.By setting zfs_bootonce_activate="YES" in rc.conf, the bootonce BE willbe set permanently active.bootonce dataset name is recorded in boot pool labels, bootenv area.in case of nextboot, the nextboot_enable boolean variable is recorded infreebsd:nvstore nvlist, also stored in boot pool label bootenv area.On boot, the loader will process /boot/nextboot.conf if nextboot_enableis "YES", and will set nextboot_enable to "NO", preventing /boot/nextboot.confprocessing on next boot.bootonce and nextboot features are usable in both UEFI and BIOS boot.To use bootonce/nextboot features, the boot loader needs to be updated on disk;if loader.efi is stored on ESP, then ESP needs to be updated andfor BIOS boot, stage2 (zfsboot or gptzfsboot) needs to be updated(gpart or other tools).At this time, only lua loader is updated.Sponsored by: Netflix, Klara Inc.Differential Revision: https://reviews.freebsd.org/D25512
zfs: add an option to the bootloader to rewind the ZFS checkpointThe checkpoints are another way of keeping the state of ZFS.During the rewind, the pool has to be exported.This makes checkpoints
zfs: add an option to the bootloader to rewind the ZFS checkpointThe 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 inthe bootloader menu.We fully support boot environments.If the rewind option is selected, the boot loader will show a list ofboot environments that existed before the checkpoint.Reviewed by: tsoome, allanjude, kevans (ok with high-level overview)Differential Revision: https://reviews.freebsd.org/D24920
loader: create single zfs nextboot implementationWe should have nextboot feature implemented in libsa zfs code.To get there, I have created zfs_nextboot() implementation based ontwo sources, our
loader: create single zfs nextboot implementationWe should have nextboot feature implemented in libsa zfs code.To get there, I have created zfs_nextboot() implementation based ontwo sources, our current simple textual string based approach with addedstructured boot label PAD structure from OpenZFS.Secondly, all nvlist details are moved to separate source file andrestructured a bit. This is done to provide base support to add nvlistadd/update feature in followup updates.And finally, the zfsboot/gptzfsboot disk access functions are swapped to uselibi386 and libsa.Sponsored by: Netflix, Klara Inc.Differential Revision: https://reviews.freebsd.org/D25324
loader: replace zfs_alloc/zfs_free with malloc/freeUse common memory management.
loader: rewrite zfs reader zap code to use mallocFirst step on removing zfs_alloc.Reviewed by: delphijDifferential Revision: https://reviews.freebsd.org/D23433
loader: rewrite zfs vdev initializationIn some cases the pool discovery will get stuck in infinite loop while settingup the vdev children.To fix, we split the vdev setup into two parts, first we
loader: rewrite zfs vdev initializationIn some cases the pool discovery will get stuck in infinite loop while settingup the vdev children.To fix, we split the vdev setup into two parts, first we create vdevs based onconfiguration we do get from pool label, then, we process pool config from MOSand update the pool config if needed.Testing done: confirm previously hung loader is not hung any more.MFC after: 1 week
loader: factor out label and uberblock load from vdev_probe, add MMP checksClean up the label read.
loader: we do not support booting from pool with log deviceIf pool has log device, stop there and tell about it.
loader: calculate physical vdev psize from asizeSince physical device asize is calculated from psize and the asize is storedin pool label, we can use asize to set the value of psize, which is used
loader: calculate physical vdev psize from asizeSince physical device asize is calculated from psize and the asize is storedin pool label, we can use asize to set the value of psize, which is used tocalculate the location of the pool labels.MFC after: 1 week
r354253 did miss lz4.c from sys/cddl/boot/zfs.
Remove duplicate lz4 implementationsPort illumos change: https://www.illumos.org/issues/11667Move lz4.c out of zfs tree to opensolaris/common/lz4, adjust it to beusable from kernel/stand/userlan
Remove duplicate lz4 implementationsPort illumos change: https://www.illumos.org/issues/11667Move lz4.c out of zfs tree to opensolaris/common/lz4, adjust it to beusable from kernel/stand/userland builds, so we can use just one singlesource. Add lz4.h to declare lz4_compress() and lz4_decompress().MFC after: 1 monthDifferential Revision: https://reviews.freebsd.org/D22037
loader: zio_checksum_verify should check byteswapWe do have both native and byteswap checksum callbacks in place but theselection is not wired.MFC after: 1 week
loader: support com.delphix:removingWe should support removing vdev from boot pool. Update loader zfs readerto support com.delphix:removing.Reviewed by: allanjudeMFC after: 2 weeksDifferential
loader: support com.delphix:removingWe should support removing vdev from boot pool. Update loader zfs readerto support com.delphix:removing.Reviewed by: allanjudeMFC after: 2 weeksDifferential Revision: https://reviews.freebsd.org/D18901
zfsboot: support newer ZFS versionsdeclare v3 objset size/layout to fix userboot and possibly other loader issues- fix for userboot assertion failure in zfs_dev_close in free due to out of bounds
zfsboot: support newer ZFS versionsdeclare v3 objset size/layout to fix userboot and possibly other loader issues- fix for userboot assertion failure in zfs_dev_close in free due to out of bounds write- fix for zfs_alloc / zfs_free mismatch assertion failure when booting GPT on BIOS
Mark two things as unused (since they are only sometimes used) andtoss in a DECONST to remove a const in some tricky code that wouldrequire too extensive a change to unwind otherwise.Sponsored by
Mark two things as unused (since they are only sometimes used) andtoss in a DECONST to remove a const in some tricky code that wouldrequire too extensive a change to unwind otherwise.Sponsored by: Netflix
Fix all warnings related to geli and ZFS support on x86.Default WARNS to 0 still, since there's still some warnings on otherarchitectures.Sponsored by: NetflixDifferential Revision: https://rev
Fix all warnings related to geli and ZFS support on x86.Default WARNS to 0 still, since there's still some warnings on otherarchitectures.Sponsored by: NetflixDifferential Revision: https://reviews.freebsd.org/D13301
loader should support large_dnodeThe zfsonlinux feature large_dnode is not yet supported by the loader.Reviewed by: avg, allanjudeDifferential Revision: https://reviews.freebsd.org/D12288
loader: update symlink support in zfs readerAs the current zfs file system is providing symlink via system attributes, needto update the code accordingly.Note, as the zfsboot code does not free
loader: update symlink support in zfs readerAs the current zfs file system is providing symlink via system attributes, needto update the code accordingly.Note, as the zfsboot code does not free the memory at this time, theobject list will put some stress on the boot2 heap, eventually we shouldaddress the issue.Reviewed by: allanjude, smhApproved by: allanjude (mentor)Differential Revision: https://reviews.freebsd.org/D9706
Bug 212114 - loader: zio_checksum_verify() must test spa for NULL pointerThe issue was introduced with adding support for salted checksums, andwas revealed by bhyve userboot.so.During pool disco
Bug 212114 - loader: zio_checksum_verify() must test spa for NULL pointerThe issue was introduced with adding support for salted checksums, andwas revealed by bhyve userboot.so.During pool discovery the loader is reading pool label from disks, andat that time the spa structure is not yet set up, so the NULL pointeris passed for spa. This condition must be checked to avoid the corruptionof the memory and NULL pointer dereference.PR: 212114Reported by: [email protected]Reviewed by: allanjudeApproved by: allanjude (mentor)Differential Revision: https://reviews.freebsd.org/D7634
Add SHA512, skein, large blocks support for loader zfs.Updated sha512 from illumos.Using skein from freebsd crypto tree.Since loader itself is using 64MB memory for heap, updated zfsboot touse s
Add SHA512, skein, large blocks support for loader zfs.Updated sha512 from illumos.Using skein from freebsd crypto tree.Since loader itself is using 64MB memory for heap, updated zfsboot touse same, and this also allows to support zfs large blocks.Note, adding additional features does increate zfsboot code, thereforethis update does increase zfsboot code to 128k, also I have ported gptldr.Supdate to zfsldr.S to support 64k+ code.With this update, boot1.efi has almost reached the current limit of the sizeset for it, so one of the future patches for boot1.efi will need toincrease the limit.Currently known missing zfs features in boot loader are edonr and gzip support.Reviewed by: delphij, impApproved by: imp (mentor)Obtained from: sha256.c update and skein_zfs.c stub from illumos.Differential Revision: https://reviews.freebsd.org/D7418
Make boot code and loader check for unsupported ZFS feature flagsOpenZFS uses feature flags instead of a zpool version number to trackfeatures since the split from Oracle. In addition to avoiding
Make boot code and loader check for unsupported ZFS feature flagsOpenZFS uses feature flags instead of a zpool version number to trackfeatures since the split from Oracle. In addition to avoiding confusionon ZFS vs OpenZFS version numbers, this also allows features to be addedto different operating systems that use OpenZFS in different order.The previous zfs boot code (gptzfsboot) and loader (zfsloader) blindlytries 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 featureslist in the ZFS label and compare it against the list of features thatthe loader supports. If any unsupported feature is active, the pool isnot considered as a candidate for booting, and a helpful diagnosticmessage is printed to the screen. Features that are merely enabled viazpool upgrade, but not in use, do not block booting from the pool.Submitted by: Toomas Soome <[email protected]>Reviewed by: delphij, mavRelnotes: yesDifferential Revision: https://reviews.freebsd.org/D6857
Use netinet/in.h to avoid include/arpa dependency for DIRDEPS_BUILD.Sponsored by: EMC / Isilon Storage Division
Include arpa/inet.h to get the htonl(3) definitionMFC after: 2 weeksReported by: clangSponsored by: EMC / Isilon Storage Division
123