[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>
This commit is contained in:
Chandra Seetharaman
2009-06-26 19:30:06 -07:00
کامیت شده توسط James Bottomley
والد b4567ca630
کامیت 6c10db72c9
2فایلهای تغییر یافته به همراه18 افزوده شده و 7 حذف شده

مشاهده پرونده

@@ -191,6 +191,8 @@ struct scsi_device_handler {
struct scsi_dh_data {
struct scsi_device_handler *scsi_dh;
struct scsi_device *sdev;
struct kref kref;
char buf[0];
};