diff options
author | Chandra Seetharaman <sekharan@us.ibm.com> | 2009-06-26 22:30:06 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-08-22 18:51:51 -0400 |
commit | 6c10db72c94818573552fd71c89540da325efdfb (patch) | |
tree | 6afa9b0431d22638a1a11dfe3c5924b8e1a8e2f3 /include/scsi | |
parent | b4567ca6304a9b31cb2eae62f812e9eb9badcb60 (diff) |
[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>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_device.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 3f566af3f101..1f3a4c8044c0 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -191,6 +191,8 @@ struct scsi_device_handler { | |||
191 | 191 | ||
192 | struct scsi_dh_data { | 192 | struct scsi_dh_data { |
193 | struct scsi_device_handler *scsi_dh; | 193 | struct scsi_device_handler *scsi_dh; |
194 | struct scsi_device *sdev; | ||
195 | struct kref kref; | ||
194 | char buf[0]; | 196 | char buf[0]; |
195 | }; | 197 | }; |
196 | 198 | ||