From: "jianchao.wang" <jianchao.w.wang@oracle.com>
To: Bart Van Assche <Bart.VanAssche@wdc.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>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"hch@lst.de" <hch@lst.de>
Subject: Re: [PATCH] scsi: core: use blk_mq_requeue_request in __scsi_queue_insert
Date: Wed, 28 Feb 2018 10:25:10 +0800 [thread overview]
Message-ID: <449a5591-252d-e1f9-967b-d9c530f1f788@oracle.com> (raw)
In-Reply-To: <1519751913.23791.6.camel@wdc.com>
Hi Bart
Thanks for your kindly response and precious time to review this.
On 02/28/2018 01:18 AM, Bart Van Assche wrote:
> On Tue, 2018-02-27 at 17:06 +0000, Bart Van Assche wrote:
>> On Tue, 2018-02-27 at 13:15 +0800, jianchao.wang wrote:
>>> Can you share more details about this ?
>>
>> After having had another look, I think your patch is fine.
>
> (replying to my own e-mail)
>
> What I think is fine in your patch is that it skips the unprep and reprep
> when requeueing. However, there is a put_device(&sdev->sdev_gendev) call
> in scsi_mq_requeue_cmd() and your patch causes that put_device() call to
> be skipped when requeueing. An explanation is needed in the commit message
> why you think that removing that put_device() call is fine.
Your concern is right.
For the block legacy path in scsi core, the get_device(&sdev->sdev_gendev) is in prep.
So when it requeue the request w/ RQF_DONTPREP, the reference will not be got again.
However, for blk-mq patch in scsi core, the get_device(&sdev->sdev_gendev) in .get_budget,
so put_device is still needed here.
Thanks for your directive.
Jianchao
prev parent reply other threads:[~2018-02-28 2:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-26 7:58 Jianchao Wang
2018-02-27 3:08 ` Bart Van Assche
2018-02-27 3:28 ` jianchao.wang
2018-02-27 3:41 ` Bart Van Assche
2018-02-27 4:00 ` jianchao.wang
2018-02-27 5:12 ` Bart Van Assche
2018-02-27 5:15 ` jianchao.wang
2018-02-27 17:06 ` Bart Van Assche
2018-02-27 17:18 ` Bart Van Assche
2018-02-28 2:25 ` jianchao.wang [this message]
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=449a5591-252d-e1f9-967b-d9c530f1f788@oracle.com \
--to=jianchao.w.wang@oracle.com \
--cc=Bart.VanAssche@wdc.com \
--cc=hch@lst.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®