Page MenuHomeFreeBSD

zfsbootcfg: use vfs.root.mountfrom and update nextboot on every vdev
ClosedPublic

Authored by tsoome on Jun 2 2020, 4:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 22, 9:34 PM
Unknown Object (File)
Fri, Mar 22, 9:34 PM
Unknown Object (File)
Fri, Mar 22, 9:34 PM
Unknown Object (File)
Fri, Mar 22, 9:34 PM
Unknown Object (File)
Mar 8 2024, 5:57 AM
Unknown Object (File)
Jan 8 2024, 1:45 AM
Unknown Object (File)
Jan 4 2024, 10:14 PM
Unknown Object (File)
Jan 4 2024, 10:14 PM
Subscribers

Details

Summary

vfs.zfs.boot.primary_pool is only set on BIOS boot, use vfs.root.mountfrom
instead and update all vdevs on pool.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31473
Build 29085: arc lint + arc unit

Event Timeline

tsoome requested review of this revision.Jun 2 2020, 4:18 PM
tsoome created this revision.
sbin/zfsbootcfg/zfsbootcfg.c
44

We should change the naming throughout zfsbootcfg to call it 'bootonce', since 'nextboot' is a different feature, and this will get confusing when we combine the two

55

Instead of doing this here, we can use the new IOCTL from upstream where looping over and writing to each label is done inside the kernel

As we progress here, we will want a switch to maintain the legacy behaviour, at least for a while. We might even decide not to change the default right away.

tsoome added inline comments.
sbin/zfsbootcfg/zfsbootcfg.c
55

yes, thats planned for next iteration.

rename install_nextboot to install_bootonce

This revision is now accepted and ready to land.Jun 5 2020, 5:30 PM
yuripv added inline comments.
head/sbin/zfsbootcfg/zfsbootcfg.c
56 ↗(On Diff #72731)

Shouldn't this be += as otherwise we'll return the status for the last child only?