[RFC PATCH 5/5] make sd_done() REQ_OP_FLUSH handling explicit

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

 



REQ_OP_FLUSH appears in the submission path processing but not in
the response path processing. Hence it takes the "default" case
which seems to be designed for REQ_OP_READ and REQ_OP_WRITE.
So add a REQ_OP_FLUSH case to the response path.

Signed-off-by: Douglas Gilbert <dgilbert@xxxxxxxxxxxx>
---

Is it correct to treat REQ_OP_FLUSH like the other OPs that
may send but never return data (as in a READ's data-in)?

Should this be fixed separately in the mainline?

 drivers/scsi/sd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 05014054e357..9cf88392e994 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2007,6 +2007,7 @@ static int sd_done(struct scsi_cmnd *SCpnt)
 		}
 	} else {
 		switch (req_op(req)) {
+		case REQ_OP_FLUSH:
 		case REQ_OP_DISCARD:
 		case REQ_OP_WRITE_ZEROES:
 		case REQ_OP_WRITE_SAME:
-- 
2.17.1




[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