Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1742561 > unrolled thread

[RFC PATCH 1/2] block: Treat all read ops as synchronous

Started byJeffy Chen <jeffy.chen@rock-chips.com>
First post2017-09-30 10:20 +0200
Last post2017-09-30 10:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [RFC PATCH 1/2] block: Treat all read ops as synchronous Jeffy Chen <jeffy.chen@rock-chips.com> - 2017-09-30 10:20 +0200

#1742561 — [RFC PATCH 1/2] block: Treat all read ops as synchronous

FromJeffy Chen <jeffy.chen@rock-chips.com>
Date2017-09-30 10:20 +0200
Subject[RFC PATCH 1/2] block: Treat all read ops as synchronous
Message-ID<uvla9-1Al-3@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web