multipath-tools: multipath should allow only path with valid size to get added in...
authorChauhan, Vijay <Vijay.Chauhan@lsi.com>
Fri, 20 Nov 2009 15:08:18 +0000 (20:38 +0530)
committerChristophe Varoqui <christophe.varoqui@free.fr>
Sun, 22 Nov 2009 00:07:11 +0000 (01:07 +0100)
commit8786ce4fa75011af16b86c3cd7c7301d09ad443d
tree96ea39c51d865750256e06af3e158129ce7f7f0a
parent4bcc93b8c01ca2b491d471c253ed75d8092a3705
multipath-tools: multipath should allow only path with valid size to get added in the map

Hi,

If READ_CAPACITY fails during device discovery, sd device gets attached with device size 0. Currently multipath discover these paths and adds into the map. RDAC patch checker sends inquiry on each path to check path status, which eventually marks this path as up. If this path is from owning controller then mode select will be issued to switch the pathgroup. But any I/O sent to this path(path with size 0) will eventually fail in sd_prep_fn due to incorrect device size and resulting to ping pong between pathgroups.  We should only allow valid paths to get added in the map. Below patch checks two cases before adding paths; i.e.:
1) device size of path is not 0
2) there is no mismatch between mpp size and new path size.

Thanks,
Vijay

----
multipath should only add paths with valid size to the map. If there is mismatch between map and path size it should not be added. This patch also check if the device size is not 0 before adding path. During device discovery if READ_CAPACITY fails, sd device get attached with device size 0. multipath should not allow the such device to get added in the map.

Signed-off-by: Vijay Chauhan <vijay.chauhan@lsi.com>
multipathd/main.c