From patchwork Fri Dec 14 19:06:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 10731581 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BEE6E6C5 for ; Fri, 14 Dec 2018 19:06:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C25532A136 for ; Fri, 14 Dec 2018 19:06:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B68302D9B4; Fri, 14 Dec 2018 19:06:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47EE12D564 for ; Fri, 14 Dec 2018 19:06:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730660AbeLNTGO (ORCPT ); Fri, 14 Dec 2018 14:06:14 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:39942 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730566AbeLNTGN (ORCPT ); Fri, 14 Dec 2018 14:06:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=r0srkHWyOjzOHdDJrFanVqLtshusUsc+4hsA0vhNt+A=; b=h7Zbs36+R6IhuZ4O4JbI6+tbn 9wAGnJ8+CBpRj+ox2o3xdTaKso2cwAi5+6jOnvA7hzERyyS3w2js4I+STc9PYOsjK1xXIg6R5I2z2 h7h2QwO/ytrXUYVAHaA/0BJ9mS8sa0hE7Ulo3dtVKBb4SSGd36Qp+XYyJibl0GIfMKPhHcHqppEfY gn0/IYr4sIltyOh2Cq9PKq2rhNK71XUm6LGVsO/YjUjq2v8KmIeZSF1STQHudtjPCpiJ2u6M9ufWF 6TFUVgZhdIhGdthHqv/yxWH3ACVEcub1sEfvykOPcSdBhfut2Z9lJJgVofjWGoVDbto1n91i4TZ9h Zuii993BQ==; Received: from [2600:1700:65a0:78e0:514:7862:1503:8e4d] (helo=sagi-Latitude-E7470.lbits) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gXsmq-0002PK-Fj; Fri, 14 Dec 2018 19:06:12 +0000 From: Sagi Grimberg To: linux-nvme@lists.infradead.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Keith Busch , Jens Axboe Subject: [PATCH v4 1/6] block: clear REQ_HIPRI if polling is not supported Date: Fri, 14 Dec 2018 11:06:05 -0800 Message-Id: <20181214190610.20086-2-sagi@grimberg.me> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181214190610.20086-1-sagi@grimberg.me> References: <20181214190610.20086-1-sagi@grimberg.me> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Christoph Hellwig This prevents a HIPRI bio from being submitted through a stacking driver that does not support polling and thus won't poll for I/O completion. Signed-off-by: Christoph Hellwig Signed-off-by: Sagi Grimberg --- block/blk-core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c index 268d2b8e9843..efa10789ddc0 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -921,6 +921,9 @@ generic_make_request_checks(struct bio *bio) } } + if (!test_bit(QUEUE_FLAG_POLL, &q->queue_flags)) + bio->bi_opf &= ~REQ_HIPRI; + switch (bio_op(bio)) { case REQ_OP_DISCARD: if (!blk_queue_discard(q))