Page MenuHomeFreeBSD

kboot: Add hostdisk override
ClosedPublic

Authored by imp on Jan 10 2023, 12:20 AM.
Tags
None
Referenced Files
F103991243: D38011.diff
Mon, Dec 2, 2:54 AM
Unknown Object (File)
Sat, Nov 30, 9:47 AM
Unknown Object (File)
Fri, Nov 15, 4:48 AM
Unknown Object (File)
Fri, Nov 15, 4:29 AM
Unknown Object (File)
Fri, Nov 15, 3:55 AM
Unknown Object (File)
Fri, Nov 15, 1:35 AM
Unknown Object (File)
Sep 10 2024, 6:58 PM
Unknown Object (File)
Sep 5 2024, 1:21 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 49039
Build 45928: arc lint + arc unit

Event Timeline

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

Only minor complaints, fixable pre-commit...

stand/kboot/hostdisk.c
270

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

299

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.