All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michael.christie@oracle.com>
To: Wenchao Hao <haowenchao@huawei.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	"James E . J . Bottomley" <jejb@linux.ibm.com>,
	Lee Duncan <lduncan@suse.com>, Chris Leech <cleech@redhat.com>,
	open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, liuzhiqiang26@huawei.com,
	linfeilong@huawei.com
Subject: Re: [PATCH 1/2] scsi:core:Add sysfs interface to control if skip lun with PQ=1
Date: Sun, 18 Dec 2022 15:37:40 -0600	[thread overview]
Message-ID: <536981a8-76a3-54b9-a70c-a86994c027dd@oracle.com> (raw)
In-Reply-To: <20221214070846.1808300-2-haowenchao@huawei.com>

On 12/14/22 1:08 AM, Wenchao Hao wrote:
> 
> When iSCSI initiator logged in target, the target attached none valid
> lun but lun0. lun0 is not an valid disk, while it would response
> inquiry command with PQ=1 and other general scsi commands like probe lun.
> The others luns of target is added/removed dynamicly.
> 
> We want the lun0 to be mapped to an sg device in initiator, so we can
> probe luns of target based on lun0.

What do you want to do exactly? Is the idea with your patch we would create
an sg device, then in userpsace you would do some scan related commands. If
you find devices then you use sysfs to have scsi-ml scan/add a specific device
like

echo 5 0 0 8 > host5/scan

?

It's not really clear to me why you need the sg device, and can't just do?

echo - - - > .../hostN/scan

? Do you only want to add specific devices like you are doing some sort of
LUN masking on the initiator side?

Is the issue that you need the sg device there, so you can detect when a device
is no longer present on the target and then you will have userspace remove the
device via the sysfs delete file?

  reply	other threads:[~2022-12-18 21:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14  7:08 [PATCH 0/2] scsi:donot skip lun if inquiry returns PQ=1 for all hosts Wenchao Hao
2022-12-14  7:08 ` [PATCH 1/2] scsi:core:Add sysfs interface to control if skip lun with PQ=1 Wenchao Hao
2022-12-18 21:37   ` Mike Christie [this message]
2022-12-28  8:46     ` Wenchao Hao
2022-12-14  7:08 ` [PATCH 2/2] scsi:iscsi_tcp:Do not skip lun inquiry returns PQ=1 Wenchao Hao
2022-12-15  7:06 ` [PATCH 0/2] scsi:donot skip lun if inquiry returns PQ=1 for all hosts Christoph Hellwig
2022-12-15  8:07   ` Antw: [EXT] " Ulrich Windl
2022-12-16  7:11     ` Christoph Hellwig
2022-12-15  9:09   ` Wenchao Hao
2022-12-16  7:12     ` Christoph Hellwig
2022-12-16 11:41       ` Wenchao Hao
2022-12-23 15:54         ` Christoph Hellwig
2022-12-28  9:35           ` Wenchao Hao

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=536981a8-76a3-54b9-a70c-a86994c027dd@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=cleech@redhat.com \
    --cc=haowenchao@huawei.com \
    --cc=jejb@linux.ibm.com \
    --cc=lduncan@suse.com \
    --cc=linfeilong@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=liuzhiqiang26@huawei.com \
    --cc=martin.petersen@oracle.com \
    --cc=open-iscsi@googlegroups.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.