]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r318895: Fix several problems with mapping code in mps(4).
authorslm <slm@FreeBSD.org>
Thu, 1 Jun 2017 16:55:03 +0000 (16:55 +0000)
committerslm <slm@FreeBSD.org>
Thu, 1 Jun 2017 16:55:03 +0000 (16:55 +0000)
commit6ec4b0641762d521d99545fd95f16cb05c65bec3
tree2818010f044ffa0b1dfd1beb96c66008bb8e66bb
parent2844e19fe7f54e34791df710ce48485a185ec5cd
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
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