]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r318895: Fix several problems with mapping code in mps(4).
authorslm <slm@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 1 Jun 2017 16:54:10 +0000 (16:54 +0000)
committerslm <slm@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 1 Jun 2017 16:54:10 +0000 (16:54 +0000)
commite9ceb862f48c37dff8b39e994a840d4baea8d802
treec27e2dff8a6397f18a9667eeb7daed9e5d008dae
parentad8e4c72ae14f406fc5f407885212e0e19d928aa
MFC r318895: Fix several problems with mapping code in mps(4).
MFC r318896: Fix several problems with mapping code in mpr(4).

-Add several comments describing what the mapping code is doing.
-Added a callout timer to improve check for missing devices when discovery has
 completed so that missing counts are incremented correctly.
-Fix problems with missing counts not being saved to the HBA.
-Update man pages mps(4) and mpr(4) to include a description of the use
 use_phy_num sysctl variable.
-Remove channel field in the mapping structure because it's not used.
-Improve logging by using mps_dprint or mpr_dprint instead of printf and adding
 more logging where appropriate.
-Add check for a bad index before writing mapping entries to controller.
-The high missing count check in the mapping table was using the incorrect
 initial value, which could lead to a bad result.
-The usage of the IN_USE flag for volume mapping was changed to be more
 intuitive, and was not being used correctly.
-The check for a free DPM entry was changed, as this was completely wrong.
-Updates to the missing count for volumes were not being done correctly, so this
 function was completely rewritten.
-_mapping_add_to_removal_table() was overly complicated and incorrectly used, so
 this function was rewritten.
-Missing counts for all devices were not being incremented properly, so this
 functionality was added.
-The search for space in the mapping table for missing enclosures was not
 calculating the found space correctly due to not breaking out of a loop when
 required, and the num_found variable was not being reset when needed.
-Retries when a device fails to get added due to a full mapping table were
 removed because this is unneccessary.
-mps_mapping_is_reinit_required() and mpr_mapping_is_reinit_required() were
 removed because they were not being used.
-Some functions were renamed to avoid confusion between Target IDs and SAS IDs.
-_mapping_check_update_ir_mt_idx() was removed because it was overly
 complicating volume mapping.
-The setting of the maxtargets variable was changed to include max volumes.
-The setting of the initiator_id variable was changed to be the invalid target
 ID after all targets, including volumes. Previously, this was set to the last
 valid target ID.
-Don't exclude target IDs of RAID components or check for a reuse of a target ID
 for RAID components.
-Some endienness was added.

Approved by: ken, mav

git-svn-id: svn://svn.freebsd.org/base/stable/10@319445 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
14 files changed:
share/man/man4/mpr.4
share/man/man4/mps.4
sys/dev/mpr/mpr.c
sys/dev/mpr/mpr_mapping.c
sys/dev/mpr/mpr_sas.c
sys/dev/mpr/mpr_sas_lsi.c
sys/dev/mpr/mpr_user.c
sys/dev/mpr/mprvar.h
sys/dev/mps/mps.c
sys/dev/mps/mps_mapping.c
sys/dev/mps/mps_sas.c
sys/dev/mps/mps_sas_lsi.c
sys/dev/mps/mps_user.c
sys/dev/mps/mpsvar.h