Page MenuHomeFreeBSD

loader: devopen() should probe partition 'a' from freebsd slice first
AbandonedPublic

Authored by tsoome on Feb 19 2019, 8:14 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 11 2024, 7:25 AM
Unknown Object (File)
Feb 10 2024, 11:25 PM
Unknown Object (File)
Jan 10 2024, 8:22 PM
Unknown Object (File)
Jan 6 2024, 8:20 AM
Unknown Object (File)
Dec 20 2023, 2:46 AM
Unknown Object (File)
Oct 28 2023, 12:00 PM
Unknown Object (File)
Oct 9 2023, 10:49 PM
Unknown Object (File)
Sep 4 2023, 8:40 AM
Subscribers
None

Details

Reviewers
imp
ian
Summary

The traditional behavior while opening freebsd MBR slice has been to try
to open BSD partition 'a' first, if that fails, open MBR slice.

The implementation of this behavior has been in disk_open(), but it does
conflict with behavior described in common/disk.h and this update does
implement the feature in devopen() instead.

After this patch, we can update disk_open() to behave as described in
common/disk.h.

Test Plan

Confirm we can open partition 'a' from MBR slice just by providing slice:

disk2s4: FreeBSD  
  disk2s4a: FreeBSD UFS   
  disk2s4b: FreeBSD UFS

OK ls disk2s4:
disk2s4:/
d .snap

passwd

OK ls disk2s4a:
disk2s4a:/
d .snap

passwd

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 22570
Build 21703: arc lint + arc unit

Event Timeline

I think this is not a good solution either. It feels like more of the same thing we've been doing for 20 years... finding a small clever hack that makes the current pain go away as an alternative to doing the larger cleanup that begs to be done.

I've opened D19262 as an attempt to do the larger cleanup, by giving these magic 0 and -1 values symbolic names, and defining a new value to mean "open the raw slice".