linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitriy Bogdanov <d.bogdanov@yadro.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: "target-devel@vger.kernel.org" <target-devel@vger.kernel.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux@yadro.com" <linux@yadro.com>,
	Roman Bolshakov <r.bolshakov@yadro.com>
Subject: RE: [PATCH v2] scsi: target: core: check SR field in REPORT LUNS
Date: Wed, 27 Jan 2021 14:45:01 +0000	[thread overview]
Message-ID: <83b96eded14d4722883836daebbe40dd@yadro.com> (raw)
In-Reply-To: <yq1tur3knh1.fsf@ca-mkp.ca.oracle.com>

Hi Martin,

>> +	switch (sr) {
>> +	case SCSI_SELECT_WELLKNOWN:
>> +	case SCSI_SELECT_ADMINISTRATIVE:
>> +	case SCSI_SELECT_SUBSIDIARY:
>> +		/* report empty lun list */
>> +		goto out;

> I'm a bit concerned about things inadvertently breaking if we return an empty list for the well known LUNs.
According to SPC we shall report an empty list if there is no well-known LUNS. 
FreeBSD has the same logic in REPORT LUNS handling. SCST does not support SELECT_WELLKNOWN case at all.

I don't know the history of the existing behaviour to send always LUN0 instead of empty list. Probably it was 
for the SCSI_SELECT_ALL_ACCESSIBLE(0x02) case, where SPC allows LUN0. My patch keeps it for the 0x00, 0x02, 0x11 cases.
Thus, I believe it does not break the backward compatibility.

BR,
 Dmitry

  reply	other threads:[~2021-01-27 14:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 10:27 [PATCH v2] scsi: target: core: check SR field in REPORT LUNS Dmitry Bogdanov
2021-01-22 22:42 ` David Disseldorp
2021-01-26  9:13   ` Roman Bolshakov
2021-01-28 20:28     ` David Disseldorp
2021-01-27  4:36 ` Martin K. Petersen
2021-01-27 14:45   ` Dmitriy Bogdanov [this message]
2021-01-28 20:47     ` Bart Van Assche
2021-02-19 13:48       ` Dmitriy Bogdanov

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=83b96eded14d4722883836daebbe40dd@yadro.com \
    --to=d.bogdanov@yadro.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@yadro.com \
    --cc=martin.petersen@oracle.com \
    --cc=r.bolshakov@yadro.com \
    --cc=target-devel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).