Re: [PATCH 15/18] scsi: allocate scsi_cmnd structures as part of struct request

From
hch@lst.de <hch@lst.de>
Date
2017-01-28 08:25:13
Also in
dm-devel, linux-raid, linux-scsi
Reply to
Bart Van Assche, 2017-01-27
On Fri, Jan 27, 2017 at 06:39:46PM +0000, Bart Van Assche wrote:
Why�have the�scsi_release_buffers() and scsi_put_command(cmd) calls been
moved up? I haven't found an explanation for this change in the patch
description.
Because they reference the scsi_cmnd, which are now part of the request
and thus freed by blk_finish_request.  And yes, I should have mentioned
it in the changelog, sorry.
Please also consider to remove the cmd->request->special = NULL assignments
via this patch. Since this patch makes the lifetime of struct scsi_cmnd and
struct request identical these assignments are no longer needed.
True.  If I had to resend again I would have fixed it up, but it's probably
not worth the churn now.
This patch introduces the function scsi_exit_rq(). Having two functions
for the single-queue path that release resources (scsi_release_buffers()
and scsi_exit_rq()) is confusing. Since every scsi_release_buffers() call
is followed by a blk_unprep_request() call, have you considered to move
the scsi_release_buffers() call into scsi_unprep_fn() via an additional
patch?
We could have done that.  But it's just more change for a code path
that I hope won't survive this calendar year.
Thread (97 messages) 97 messages, 6 authors, last reply 2017-02-03
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help