mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH 1/2] block: Treat all read ops as synchronous
@ 2017-09-30  8:13 Jeffy Chen
  2017-09-30  8:13 ` [RFC PATCH 2/2] block/cfq: Fix memory leak of async cfqq Jeffy Chen
  0 siblings, 1 reply; 2+ messages in thread
From: Jeffy Chen @ 2017-09-30  8:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jeffy Chen, Hannes Reinecke, Shaun Tancheff, Martin K. Petersen,
	NeilBrown, Jens Axboe, Shaohua Li, Omar Sandoval

We added some in/out ops(eg. REQ_OP_SCSI_IN/OUT), but currently the
op_is_sync() is only checking REQ_OP_READ.

So treat all read ops as synchronous.

Fixes: aebf526b53ae ("block: fold cmd_type into the REQ_OP_ space")
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---

 include/linux/blk_types.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index a2d2aa709cef..9b623ea4faa6 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -288,8 +288,7 @@ static inline bool op_is_flush(unsigned int op)
  */
 static inline bool op_is_sync(unsigned int op)
 {
-	return (op & REQ_OP_MASK) == REQ_OP_READ ||
-		(op & (REQ_SYNC | REQ_FUA | REQ_PREFLUSH));
+	return !op_is_write(op) || (op & (REQ_SYNC | REQ_FUA | REQ_PREFLUSH));
 }
 
 typedef unsigned int blk_qc_t;
-- 
2.11.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-30  8:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-30  8:13 [RFC PATCH 1/2] block: Treat all read ops as synchronous Jeffy Chen
2017-09-30  8:13 ` [RFC PATCH 2/2] block/cfq: Fix memory leak of async cfqq Jeffy Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®