From: Jeffy Chen <jeffy.chen@rock-chips.com>
To: linux-kernel@vger.kernel.org
Cc: Jeffy Chen <jeffy.chen@rock-chips.com>,
Hannes Reinecke <hare@suse.com>,
Shaun Tancheff <shaun.tancheff@seagate.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
NeilBrown <neilb@suse.com>, Jens Axboe <axboe@kernel.dk>,
Shaohua Li <shli@fb.com>, Omar Sandoval <osandov@fb.com>
Subject: [RFC PATCH 1/2] block: Treat all read ops as synchronous
Date: Sat, 30 Sep 2017 16:13:35 +0800 [thread overview]
Message-ID: <20170930081336.8769-1-jeffy.chen@rock-chips.com> (raw)
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
next reply other threads:[~2017-09-30 8:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-30 8:13 Jeffy Chen [this message]
2017-09-30 8:13 ` [RFC PATCH 2/2] block/cfq: Fix memory leak of async cfqq Jeffy Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170930081336.8769-1-jeffy.chen@rock-chips.com \
--to=jeffy.chen@rock-chips.com \
--cc=axboe@kernel.dk \
--cc=hare@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=neilb@suse.com \
--cc=osandov@fb.com \
--cc=shaun.tancheff@seagate.com \
--cc=shli@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®