From patchwork Fri Dec 14 16:21:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10731395 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 EF71314E5 for ; Fri, 14 Dec 2018 16:21:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 80B4B2D861 for ; Fri, 14 Dec 2018 16:21:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 752F12D849; Fri, 14 Dec 2018 16:21:26 +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 2B43D2D84F for ; Fri, 14 Dec 2018 16:21:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729748AbeLNQVZ (ORCPT ); Fri, 14 Dec 2018 11:21:25 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:54560 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727698AbeLNQVZ (ORCPT ); Fri, 14 Dec 2018 11:21:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=bggtyBEbG34io588W2NZDb84f8RWVx7porrtxyQOIqI=; b=QpGqc665kXyTlJZjz0LpBtMeB SjuLjn3StMd0Y2wHy9rHl9mNnT38lUOq6IDuwLu6yqtajEM2TomFDQswmcbV61yjHINj9TlhFdQ9j uBTd1Lu+wpSMKgy4ZJ2Lm2WOsLe4u2SfHRci1FudDXM77Fzor1kE3Ms/WTj065oLU8p5UlDiAeM9J 6IJla6jTAWQaB/Mu3RVhPsmKPFKdv6NBzqcWm9FkI3ELFQUanXEMkY+3RZAlkpSsj8WCgz/u5ymmt SyiJ3kgVqqRnJC7kEQqaZ3r3mCmc8v9JBDsPByiW8irB6ZwHDk4KFkF69Dys7Tp5Sd+zF0V8DXRa1 HGFhYDo4Q==; Received: from 089144198147.atnat0007.highway.a1.net ([89.144.198.147] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gXqDM-0006Yi-Do; Fri, 14 Dec 2018 16:21:25 +0000 From: Christoph Hellwig To: axboe@kernel.dk Cc: linux-block@vger.kernel.org Subject: [PATCH] block: clear REQ_HIPRI if polling is not supported Date: Fri, 14 Dec 2018 17:21:22 +0100 Message-Id: <20181214162122.14937-1-hch@lst.de> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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 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 --- 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))