On 11/20/19 2:31 AM, Hannes Reinecke wrote:
+static bool flush_cmds_iter(struct request *rq, void *data, bool reserved) +{ + struct scsi_cmnd *scmd = blk_mq_rq_to_pdu(rq); + int status = *(int *)data; + + if (reserved) + return true;
Since the SCSI core does not support reserving tags, this early return is dead code. Additionally, I'm not sure this early return would be correct if reserved tag support would be added to the SCSI core. How about leaving out this early return?
+ scsi_dma_unmap(scmd); + scmd->result = status << 16; + scmd->scsi_done(scmd); + return true; +} + +/** + * scsi_host_flush_commands -- Terminate all running commands
^^ Should this have been a single hyphen? Thanks, Bart.