Re: [PATCH 02/11] scsi: add scsi_host_flush_commands() helper

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

 



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.



[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