From: Mike Christie <michaelc@cs.wisc.edu>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Serguei Bezverkhi (sbezverk)" <sbezverk@cisco.com>,
"bugzilla-daemon@bugzilla.kernel.org"
<bugzilla-daemon@bugzilla.kernel.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
Hannes Reinecke <hare@suse.de>
Subject: Re: [Bug 111441] New: iscsi fails to attach to targets
Date: Tue, 02 Feb 2016 14:12:00 -0600 [thread overview]
Message-ID: <56B10D90.2010506@cs.wisc.edu> (raw)
In-Reply-To: <20160202180956.GB13880@infradead.org>
[-- Attachment #1: Type: text/plain, Size: 1325 bytes --]
On 02/02/2016 12:09 PM, Christoph Hellwig wrote:
> On Fri, Jan 29, 2016 at 05:32:54PM -0600, Mike Christie wrote:
>> Hey Christoph and Hannes,
>>
>> The dh/alua changes that added this:
>>
>> error = scsi_dh_add_device(sdev);
>> if (error) {
>> sdev_printk(KERN_INFO, sdev,
>> "failed to add device handler: %d\n",
>> error);
>> return error;
>> }
>>
>> to scsi_sysfs_add_sdev are adding a regression.
>>
>> 1. If that fails, then we forget to do device_del before doing the
>> return. My patch in this thread added that back, so we do not see the
>> sysfs oopses anymore. But.....
>
> Ok.
>
>> 2. It looks like in older kernels, we would allow misconfigured targets
>> like this one to still setup devices. Do we want that old behavior back?
>> Should we just ignore the return value from scsi_dh_add_device above?
>> Note that in this case, it is LIO so it can be easily fixed on the
>> target side by just setting it up properly. I do not think other targets
>> would hit this type of issue.
>
> Be liberal in what you accept.. I guess we need to continue allowing
> to connect to these broken targets, but a warning would be useful.
>
> Can you send a patch?
Serguei, can you try the attached patch? Drop the other one I sent.
[-- Attachment #2: scsi-allow-attach-failures.patch --]
[-- Type: text/x-patch, Size: 584 bytes --]
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 21930c9..7dcc4bf 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -1059,9 +1059,12 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev)
error = scsi_dh_add_device(sdev);
if (error) {
+ /*
+ * Allow device setup to succeed. Attachment can be retried
+ * from userpsace or device can be still used in degraded mode.
+ */
sdev_printk(KERN_INFO, sdev,
"failed to add device handler: %d\n", error);
- return error;
}
device_enable_async_suspend(&sdev->sdev_dev);
next prev parent reply other threads:[~2016-02-02 20:12 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-28 22:51 [Bug 111441] New: iscsi fails to attach to targets bugzilla-daemon
2016-01-29 1:53 ` Mike Christie
2016-01-29 2:13 ` Mike Christie
2016-01-29 2:55 ` Serguei Bezverkhi (sbezverk)
2016-01-29 8:01 ` Michael Christie
2016-01-29 8:25 ` Mike Christie
2016-01-29 12:04 ` Serguei Bezverkhi (sbezverk)
2016-01-29 19:08 ` Michael Christie
2016-01-29 19:11 ` Serguei Bezverkhi (sbezverk)
2016-01-29 19:26 ` Mike Christie
2016-01-29 22:21 ` Serguei Bezverkhi (sbezverk)
2016-01-29 23:32 ` Mike Christie
2016-01-30 7:38 ` Nicholas A. Bellinger
2016-02-01 16:55 ` Mike Christie
2016-02-02 16:41 ` Serguei Bezverkhi (sbezverk)
2016-02-02 22:56 ` Nicholas A. Bellinger
2016-02-02 23:21 ` Serguei Bezverkhi (sbezverk)
2016-02-08 8:01 ` Nicholas A. Bellinger
2016-02-16 19:08 ` Hannes Reinecke
2016-02-27 22:15 ` Nicholas A. Bellinger
2016-02-02 18:09 ` Christoph Hellwig
2016-02-02 20:12 ` Mike Christie [this message]
2016-02-02 20:25 ` Serguei Bezverkhi (sbezverk)
2016-02-02 21:54 ` Serguei Bezverkhi (sbezverk)
2016-02-22 0:45 ` Serguei Bezverkhi (sbezverk)
2016-02-22 7:08 ` Hannes Reinecke
2016-02-22 11:36 ` Serguei Bezverkhi (sbezverk)
2016-01-29 3:00 ` [Bug 111441] " bugzilla-daemon
2016-01-29 3:05 ` bugzilla-daemon
2016-01-29 3:32 ` bugzilla-daemon
2016-01-29 3:40 ` bugzilla-daemon
2016-01-29 12:04 ` bugzilla-daemon
2016-01-29 19:11 ` bugzilla-daemon
2016-01-29 22:21 ` bugzilla-daemon
2016-01-30 7:46 ` bugzilla-daemon
2016-02-01 2:13 ` bugzilla-daemon
2016-02-02 16:41 ` bugzilla-daemon
2016-02-02 20:25 ` bugzilla-daemon
2016-02-02 22:03 ` bugzilla-daemon
2016-02-02 22:56 ` bugzilla-daemon
2016-02-02 23:21 ` bugzilla-daemon
2016-02-08 8:01 ` bugzilla-daemon
2016-02-22 0:45 ` bugzilla-daemon
2016-02-22 7:08 ` bugzilla-daemon
2016-02-22 11:36 ` bugzilla-daemon
2016-02-27 22:15 ` bugzilla-daemon
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=56B10D90.2010506@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=bugzilla-daemon@bugzilla.kernel.org \
--cc=hare@suse.de \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=sbezverk@cisco.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.