[SCSI] scsi_dh: Reference count scsi_dh_attach
authorChandra Seetharaman <sekharan@us.ibm.com>
Sat, 27 Jun 2009 02:30:06 +0000 (19:30 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Sat, 22 Aug 2009 22:51:51 +0000 (17:51 -0500)
commit6c10db72c94818573552fd71c89540da325efdfb
tree6afa9b0431d22638a1a11dfe3c5924b8e1a8e2f3
parentb4567ca6304a9b31cb2eae62f812e9eb9badcb60
[SCSI] scsi_dh: Reference count scsi_dh_attach

Problem reported: http://marc.info/?l=dm-devel&m=124585978305866&w=2

scsi_dh does not do a refernce count for attach/detach, and this affects
the way it is supposed to work with multipath when a device is not
in the dev_list of the hardware handler.

This patch adds a reference count that counts each attach.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/device_handler/scsi_dh.c
include/scsi/scsi_device.h