From: Chandra Seetharaman <sekharan@us.ibm.com>
To: James Bottomley <James.Bottomley@suse.de>
Cc: Mario Mech <mech@meteo.uni-koeln.de>,
dm-devel <dm-devel@redhat.com>,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: [RESEND] [PATCH]: scsi_dh: create sysfs file, dh_state for SCSI devices even if they are not in the internal lists
Date: Fri, 11 Sep 2009 10:20:35 -0700 [thread overview]
Message-ID: <1252689635.2541.4.camel@chandra-ubuntu> (raw)
In-Reply-To: <1246069888.14164.53.camel@chandra-ubuntu>
Hi James,
This patch was sent to the list long back and was Acked by Hannes on Aug
11.
Please consider for inclusion. Let me know if you see any issues with
the patch.
regards,
chandra
-------------------------
Create the sysfs file, dh_state even if the new SCSI device is not
in the any of the device handler's internal lists.
Signed-Off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Acked-by: Hannes Reinecke <hare@suse.de>
---
drivers/scsi/device_handler/scsi_dh.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
Index: linux-2.6.31/drivers/scsi/device_handler/scsi_dh.c
===================================================================
--- linux-2.6.31.orig/drivers/scsi/device_handler/scsi_dh.c
+++ linux-2.6.31/drivers/scsi/device_handler/scsi_dh.c
@@ -292,18 +292,15 @@ static int scsi_dh_notifier(struct notif
sdev = to_scsi_device(dev);
if (action == BUS_NOTIFY_ADD_DEVICE) {
+ err = device_create_file(dev, &scsi_dh_state_attr);
+ /* don't care about err */
devinfo = device_handler_match(NULL, sdev);
- if (!devinfo)
- goto out;
-
- err = scsi_dh_handler_attach(sdev, devinfo);
- if (!err)
- err = device_create_file(dev, &scsi_dh_state_attr);
+ if (devinfo)
+ err = scsi_dh_handler_attach(sdev, devinfo);
} else if (action == BUS_NOTIFY_DEL_DEVICE) {
device_remove_file(dev, &scsi_dh_state_attr);
scsi_dh_handler_detach(sdev, NULL);
}
-out:
return err;
}
prev parent reply other threads:[~2009-09-11 17:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-27 2:31 [PATCH]: create sysfs file, dh_state for SCSI devices even if they are not in the inteernal lists Chandra Seetharaman
2009-06-29 7:40 ` [dm-devel] " Hannes Reinecke
2009-06-29 16:09 ` James Bottomley
2009-06-30 6:39 ` Hannes Reinecke
2009-06-29 19:30 ` Chandra Seetharaman
2009-07-07 19:43 ` [dm-devel] " Chandra Seetharaman
2009-08-03 19:51 ` Chandra Seetharaman
2009-08-11 8:54 ` Hannes Reinecke
2009-09-11 17:20 ` Chandra Seetharaman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1252689635.2541.4.camel@chandra-ubuntu \
--to=sekharan@us.ibm.com \
--cc=James.Bottomley@suse.de \
--cc=dm-devel@redhat.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mech@meteo.uni-koeln.de \
--cc=sekharan@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox