From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752706AbdI3IOR (ORCPT ); Sat, 30 Sep 2017 04:14:17 -0400 Received: from regular1.263xmail.com ([211.150.99.133]:45487 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750847AbdI3IOP (ORCPT ); Sat, 30 Sep 2017 04:14:15 -0400 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: <0549ac0c2db65d9c2bfdce093b6176cb> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: Jeffy Chen To: linux-kernel@vger.kernel.org Cc: Jeffy Chen , Hannes Reinecke , Shaun Tancheff , "Martin K. Petersen" , NeilBrown , Jens Axboe , Shaohua Li , Omar Sandoval Subject: [RFC PATCH 1/2] block: Treat all read ops as synchronous Date: Sat, 30 Sep 2017 16:13:35 +0800 Message-Id: <20170930081336.8769-1-jeffy.chen@rock-chips.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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