Thread (106 messages) 106 messages, 9 authors, 2021-09-28

Re: [PATCH 02/84] scsi: core: Rename scsi_mq_done() into scsi_done() and export it

From: Bart Van Assche <bvanassche@acm.org>
Date: 2021-09-20 16:28:37

On 9/20/21 2:42 AM, John Garry wrote:
On 18/09/2021 01:04, Bart Van Assche wrote:
quoted
@@ -1692,7 +1693,7 @@ static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx,
      scsi_set_resid(cmd, 0);
      memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
-    cmd->scsi_done = scsi_mq_done;
+    cmd->scsi_done = scsi_done;
I have gone to the end of the series, and we still set scsi_cmnd.scsi_done. So some drivers still rely on it. I thought that the idea was that we don't need this callback pointer any longer.
It seems like the email service I used to send out the patches (gmail)
dropped patches 79/84..84/84. The entire patch series is available here:
https://github.com/bvanassche/linux/tree/scsi-remove-done-callback

Patch 84/84 includes the following change:

  @@ -1693,7 +1693,6 @@ static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx,

  	scsi_set_resid(cmd, 0);
  	memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
-	cmd->scsi_done = scsi_done;

  	blk_mq_start_request(req);
  	reason = scsi_dispatch_cmd(cmd);
As an aside, this is the current declaration of scsi_cmnd.scsi_done:

/* Low-level done function - can be used by low-level driver to point
*        to completion function.  Not used by mid/upper level code. */
     void (*scsi_done) (struct scsi_cmnd *);

That does not sound right, as scsi_done is set by the mid-layer.
"Not used" probably should have been "not called". Anyway, patch 84/84
removes that function pointer and also the comment above that function
pointer.

Thanks,

Bart.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help