mpr/mps device mapper override
AcceptedPublic

Authored by scottl on Oct 31 2016, 8:55 PM.

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
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 5805
Build 6097: arc lint + arc unit
scottl retitled this revision from to mpr/mps device mapper override.Oct 31 2016, 8:55 PM
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

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
scottl added a comment.Nov 2 2016, 2:58 AM

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 updated this revision to Diff 21922.Nov 2 2016, 3:01 AM

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

scottl added a comment.Nov 2 2016, 3:02 AM

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

smh accepted this revision.Nov 2 2016, 9:28 AM
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