Page MenuHomeFreeBSD

kboot: Add hostdisk override
ClosedPublic

Authored by imp on Jan 10 2023, 12:20 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 10 2024, 6:58 PM
Unknown Object (File)
Sep 5 2024, 1:21 AM
Unknown Object (File)
Aug 19 2024, 8:54 AM
Unknown Object (File)
Aug 9 2024, 7:33 AM
Unknown Object (File)
Aug 6 2024, 6:30 AM
Unknown Object (File)
Jul 29 2024, 2:44 PM
Unknown Object (File)
Jul 27 2024, 5:34 PM
Unknown Object (File)
Jul 18 2024, 4:13 PM
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.