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
F81657406: D25103.diff
Fri, Apr 19, 1:51 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)
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
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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

tsoome requested review of this revision.Jun 2 2020, 4:18 PM
tsoome created this revision.
sbin/zfsbootcfg/zfsbootcfg.c
44 ↗(On Diff #72569)

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 ↗(On Diff #72569)

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 ↗(On Diff #72569)

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

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