From: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
To: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
David Dillow <dillowda-1Heg1YXhbW8@public.gmane.org>,
Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
Subject: Re: [PATCH] ib_srp: Avoid that LUN scanning creates duplicate devices
Date: Sat, 25 Jun 2011 04:58:43 -0400 [thread overview]
Message-ID: <20110625085843.GA3172@infradead.org> (raw)
In-Reply-To: <201106251010.30994.bvanassche-HInyCGIudOg@public.gmane.org>
On Sat, Jun 25, 2011 at 10:10:30AM +0200, Bart Van Assche wrote:
> SCSI scanning of a channel:id:lun triplet in Linux works as follows (function
> scsi_scan_target() in drivers/scsi/scsi_scan.c):
> - If lun == SCAN_WILD_CARD, send a REPORT LUNS command to the target and
> process the result.
> - If lun != SCAN_WILD_CARD, send an INQUIRY command to the LUN corresponding
> to the specified channel:id:lun triplet to verify whether the LUN exists.
> So a SCSI driver must either take the channel and target id values in account
> in its quecommand() function or it should declare that it only supports one
> channel and one target id. Currently the ib_srp driver does neither. As a
> result scanning the SCSI bus via e.g. rescan-scsi-bus.sh causes many
> duplicate SCSI devices to be created. For each 0:0:L device, several
> duplicates are created with the same LUN number and with (C:I) != (0:0). Fix
> this by declaring that the ib_srp driver only supports one channel and one
> target id.
Looks good. We should probably consider chosing sane defaults at least
for max_channel, but for now this is the best fix.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-06-25 8:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-25 8:10 [PATCH] ib_srp: Avoid that LUN scanning creates duplicate devices Bart Van Assche
[not found] ` <201106251010.30994.bvanassche-HInyCGIudOg@public.gmane.org>
2011-06-25 8:58 ` Christoph Hellwig [this message]
[not found] ` <20110625085843.GA3172-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2011-06-25 9:42 ` Bart Van Assche
[not found] ` <BANLkTinuQKz9_uBZVDirNMaEH1WVRyMEnQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-25 11:02 ` Christoph Hellwig
2011-06-25 16:14 ` David Dillow
[not found] ` <1309018469.6908.3.camel-1q1vX8mYZiGLUyTwlgNVppKKF0rrzTr+@public.gmane.org>
2011-07-19 11:24 ` Bart Van Assche
[not found] ` <CAO+b5-rfaf2DQtuGQePivWppzX5YC+Zbj_6Et1U6HrMJF6CLXA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-07-19 16:03 ` David Dillow
[not found] ` <1311091437.18631.1.camel-FqX9LgGZnHWDB2HL1qBt2PIbXMQ5te18@public.gmane.org>
2011-07-19 16:16 ` Roland Dreier
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=20110625085843.GA3172@infradead.org \
--to=hch-wegcikhe2lqwvfeawa7xhq@public.gmane.org \
--cc=bvanassche-HInyCGIudOg@public.gmane.org \
--cc=dillowda-1Heg1YXhbW8@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org \
/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