Page MenuHomeFreeBSD

kboot: Add hostdisk override
ClosedPublic

Authored by imp on Jan 10 2023, 12:20 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 2, 11:41 AM
Unknown Object (File)
Tue, Apr 30, 10:12 AM
Unknown Object (File)
Mon, Apr 29, 7:58 PM
Unknown Object (File)
Mar 17 2024, 12:58 PM
Unknown Object (File)
Mar 14 2024, 9:03 PM
Unknown Object (File)
Mar 14 2024, 9:02 PM
Unknown Object (File)
Mar 14 2024, 8:58 PM
Unknown Object (File)
Mar 11 2024, 7:01 AM
Subscribers

Details

Summary

When hostdisk_override is set, all the /dev devices are hidden, and only
the files in that directory are used. This will allow filesystem testing
on FreeBSD without root, for example. Adjust the parse routine to not
require devices start with /dev (plus fix a leak for an error
condition). Add a match routine to allow the device name to be something
like "/home/user/testing/zfsfoo:" instead of strictly in /dev. Note:
since we need to look at all the devices in the system to probe for ZFS
zpools, you can't generally use a full path to get a 'virtual disk' at
this time.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Jan 10 2023, 12:20 AM

Only minor complaints, fixable pre-commit...

stand/kboot/hostdisk.c
271

Need to free(fn); before this return, too, since it's not being stashed anywhere.

300

Nit: spaces around assignment

This revision is now accepted and ready to land.Jan 12 2023, 5:41 AM
This revision was automatically updated to reflect the committed changes.