From: Bart Van Assche <bvanassche@acm.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
Doug Ledford <dledford@redhat.com>,
linux-rdma@vger.kernel.org,
Sergey Gorenko <sergeygo@mellanox.com>,
Max Gurtovoy <maxg@mellanox.com>,
Laurence Oberman <loberman@redhat.com>,
stable@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 2/2] RDMA/srp: Rework SCSI device reset handling
Date: Mon, 21 Jan 2019 13:08:14 -0800 [thread overview]
Message-ID: <9ac0cf58-c8fc-876b-9b82-2c78416bf5fa@acm.org> (raw)
In-Reply-To: <20190119100452.GC24246@infradead.org>
On 1/19/19 2:04 AM, Christoph Hellwig wrote:
>> + /* Check whether all requests have finished. */
>> + blk_freeze_queue_start(q);
>> + time_left = blk_mq_freeze_queue_wait_timeout(q, 1 * HZ);
>> + blk_mq_unfreeze_queue(q);
>>
>> + return time_left > 0 ? SUCCESS : FAILED;
>
> This is entirely generic SCSI/block evel functionality. I'd rather have
> a new WAIT_FOR_FREEZE return value from ->eh_device_reset_handler and
> handle this in the SCSI midlayer.
Hi Christoph,
Since a SCSI device must only reply to a reset task management function
after all affected commands have completed, the only case in which that
wait code is useful is if a regular reply is sent concurrently with the
SCSI reset reply and the two replies get reordered. Since the SCSI error
handler is able to deal with pending commands after a device reset, how
about leaving out the queue freeze / unfreeze code?
Thanks,
Bart.
next prev parent reply other threads:[~2019-01-21 21:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190117002717.84686-1-bvanassche@acm.org>
2019-01-17 0:27 ` [PATCH 1/2] RDMA/srp: Avoid calling mutex_lock() from inside scsi_queue_rq() Bart Van Assche
2019-01-19 10:03 ` Christoph Hellwig
2019-01-21 21:21 ` Bart Van Assche
2019-01-17 0:27 ` [PATCH 2/2] RDMA/srp: Rework SCSI device reset handling Bart Van Assche
2019-01-19 10:04 ` Christoph Hellwig
2019-01-21 21:08 ` Bart Van Assche [this message]
[not found] ` <20190122155559.D1DD9217D6@mail.kernel.org>
2019-01-22 16:04 ` Bart Van Assche
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=9ac0cf58-c8fc-876b-9b82-2c78416bf5fa@acm.org \
--to=bvanassche@acm.org \
--cc=dledford@redhat.com \
--cc=hch@infradead.org \
--cc=jgg@ziepe.ca \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=loberman@redhat.com \
--cc=maxg@mellanox.com \
--cc=sergeygo@mellanox.com \
--cc=stable@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).