From: Wei Fang <fangwei1@huawei.com>
To: Bart Van Assche <Bart.VanAssche@sandisk.com>,
"jejb@linux.vnet.ibm.com" <jejb@linux.vnet.ibm.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"tyasui@redhat.com" <tyasui@redhat.com>
Subject: Re: [PATCH] scsi: avoid a permanent stop of the scsi device's request queue
Date: Wed, 7 Dec 2016 09:20:59 +0800 [thread overview]
Message-ID: <584763FB.9010602@huawei.com> (raw)
In-Reply-To: <BLUPR02MB16838CCF3E631720279B921781820@BLUPR02MB1683.namprd02.prod.outlook.com>
Hi, Bart,
On 2016/12/6 23:51, Bart Van Assche wrote:
> On 12/06/16 01:12, Wei Fang wrote:
>> The scsi device is being setted to the SDEV_RUNNING state at the end of
>> the scan work. When the remote port reappears, scsi_target_unblock()
>> will be called, but the QUEUE_FLAG_STOPPED flag will not be cleared,
>> since scsi_internal_device_unblock() ignores SCSI devices in SDEV_RUNNING
>> state. It results in a permanent stop of the scsi device's request
>> queue. Every requests sended to it will be blocked.
>
> Hello Wei,
>
> scsi_device_set_state() does not allow the transition from
> SDEV_CREATED_BLOCK to SDEV_RUNNING. If a SCSI device is blocked after it
> has been added to the __devices list and before scsi_add_lun() finishes
> then I think the scan code will change its state into SDEV_BLOCK. Are
> you sure what you described above is what happened?
Yes, we already encountered this case on out machine:
The state of the scsi device first is changed to SDEV_BLOCK in
scsi_add_lun() as you metioned, then it will be changed to SDEV_RUNNING
in scsi_sysfs_add_sdev().
Thanks,
Wei
next prev parent reply other threads:[~2016-12-07 1:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 9:12 [PATCH] scsi: avoid a permanent stop of the scsi device's request queue Wei Fang
2016-12-06 15:51 ` Bart Van Assche
2016-12-07 1:20 ` Wei Fang [this message]
2016-12-07 2:45 ` Bart Van Assche
2016-12-07 3:41 ` Wei Fang
2016-12-07 4:40 ` Bart Van Assche
2016-12-07 6:59 ` Wei Fang
2016-12-07 16:48 ` Bart Van Assche
2016-12-07 16:55 ` Bart Van Assche
2016-12-07 17:40 ` Ewan D. Milne
2016-12-07 18:16 ` James Bottomley
2016-12-07 19:24 ` Ewan D. Milne
2016-12-07 20:09 ` James Bottomley
2016-12-07 20:30 ` Ewan D. Milne
2016-12-07 23:43 ` James Bottomley
2016-12-08 2:28 ` Wei Fang
2016-12-08 2:33 ` James Bottomley
2016-12-08 3:22 ` Wei Fang
2016-12-08 6:38 ` Wei Fang
2016-12-08 14:04 ` Ewan D. Milne
2016-12-08 15:39 ` James Bottomley
2016-12-09 1:08 ` Wei Fang
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=584763FB.9010602@huawei.com \
--to=fangwei1@huawei.com \
--cc=Bart.VanAssche@sandisk.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=tyasui@redhat.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.