Page MenuHomeFreeBSD

kboot: Add hostdisk override
ClosedPublic

Authored by imp on Jan 10 2023, 12:20 AM.
Tags
None
Referenced Files
F86849682: D38011.id114920.diff
Wed, Jun 26, 1:23 PM
F86815764: D38011.id114979.diff
Wed, Jun 26, 12:28 AM
Unknown Object (File)
Tue, Jun 25, 11:14 AM
Unknown Object (File)
Mon, Jun 24, 10:06 PM
Unknown Object (File)
Mon, Jun 24, 5:09 PM
Unknown Object (File)
Mon, Jun 24, 2:13 PM
Unknown Object (File)
Sun, Jun 23, 4:32 AM
Unknown Object (File)
Fri, Jun 21, 8:36 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.