Page MenuHomeFreeBSD

mpr/mps device mapper override
AcceptedPublic

Authored by scottl on Oct 31 2016, 8:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 13, 4:44 AM
Unknown Object (File)
Nov 15 2024, 6:35 AM
Unknown Object (File)
Oct 2 2024, 7:29 PM
Unknown Object (File)
Oct 2 2024, 1:08 AM
Unknown Object (File)
Sep 30 2024, 2:17 AM
Unknown Object (File)
Sep 27 2024, 2:02 AM
Unknown Object (File)
Sep 7 2024, 10:38 PM
Unknown Object (File)
Aug 18 2024, 6:28 AM
Subscribers
None

Details

Reviewers
ken
slm
imp
smh
Summary

Create a new sysctl and tunable to help ensure sane numbering of devices.
There are cases where the device_mapper code fails to generating mappings
between device handles and target numbers, or persistent mappings create
unpredictable holes in the numbering. This knob allows the driver to
fall back to a simple phy number mapping if the device mapper fails, or
allows the operator to override the device mapper entirely.

dev.mps.0.use_phy_num
hw.mps.use_phy_num
dev.mpr.0.use_phy_num
hw.mpr.0.use_phy_num

1 - use the PhyNum field as a fallback to the mapping logic
0 - never use the PhyNum field
-1 - only use the PhyNum field

Diff Detail

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

Event Timeline

scottl retitled this revision from to mpr/mps device mapper override.
scottl updated this object.
scottl edited the test plan for this revision. (Show Details)
scottl added reviewers: imp, ken, smh.
smh requested changes to this revision.Oct 31 2016, 11:10 PM
smh edited edge metadata.

Wouldn't it be better to have 0 (the default) be "use the PhyNum field as a fallback to the mapping logic" as that way at least the device would initialise when mpX_mapping_get_sas_id fails?

sys/dev/mpr/mpr.c
1522

typo: enumeration

sys/dev/mpr/mprvar.h
374

use a int8_t?

sys/dev/mps/mps.c
1507

typo

sys/dev/mps/mpsvar.h
387

use a int8_t?

This revision now requires changes to proceed.Oct 31 2016, 11:10 PM

I'll set the default to 1 in the next revision.

sys/dev/mpr/mprvar.h
374

An int is required in order to be type compatible with TUNABLE_INT_FETCH and SYSCTL_ADD_INT. I could work around this with some accessor procedures, but I'm not sure it's worth the extra complication.

scottl edited edge metadata.

Address string typo and move a structure field around to a more logical spot.

Last comment might have been lost. I've set the default to 1.

smh edited edge metadata.
smh added inline comments.
sys/dev/mpr/mprvar.h
374

Ahh not worth the hassle then.

This revision is now accepted and ready to land.Nov 2 2016, 9:28 AM