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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/20/21 2:42 AM, John Garry wrote:
On 18/09/2021 01:04, Bart Van Assche wrote:
@@ -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.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux