Page MenuHomeFreeBSD

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

Authored by tsoome on Jun 2 2020, 4:18 PM.

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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; 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?