From patchwork Tue Dec 27 15:55:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9489373 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7C2B262AAD for ; Tue, 27 Dec 2016 15:59:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E3B4200E7 for ; Tue, 27 Dec 2016 15:59:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62E592094F; Tue, 27 Dec 2016 15:59:59 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 1DAB8200E7 for ; Tue, 27 Dec 2016 15:59:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751294AbcL0P75 (ORCPT ); Tue, 27 Dec 2016 10:59:57 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:32952 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753020AbcL0P7v (ORCPT ); Tue, 27 Dec 2016 10:59:51 -0500 Received: by mail-pf0-f193.google.com with SMTP id 127so8374653pfg.0; Tue, 27 Dec 2016 07:59:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3oN2CbdKt4FmO1XD7J6h6vz/lwr95VCm6/Z80Yuht/0=; b=BR8XySJBvK+5J9T24C2yhXwZ7ulm9NbWdvi+vwBLqRAcXVFerCnbwEvvQgqpze0UFs 6J1DtCWv8/lXlSl8vznVVvSlndz6Ug3mG73mTMZG1RYxLipVuOzAl0vOb2xfX9QkJWRR zOyztzIMHC4J3XqFrgmdPvDSGb8m+KJDuFJbKclRRg1JedaSs66r8fYZsotJzeQnBsBi K8HCHGxgBj5Pw/cgpOivzzLgc8yXKWIt3h2ooUY417nGbb4yFgZD6Tuuw1HVY0Uyg5jL 25BKA6sau6EUJRtcriseoraxk9+EjBmHtlq0Ot7hZQCxk+aD6ulrmTXO6UlYpRVqHS7q 8hVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3oN2CbdKt4FmO1XD7J6h6vz/lwr95VCm6/Z80Yuht/0=; b=AFb0fXtIZhn7mhj2SQvZo40vZy4Sjj0MvHG1GWwgrZIIaYyUve2tOjEm80p2G+Jxov FmJ0g1XeN4vN7ykpVOPGyYOChwqxGXLtj7SGfNr+kNUkDvs/+ysSRzFhzh+Dl3vzUAIc rWwzCYfzyc0B+eMqEhz6HKN5BZaGKaq55A1BtXNwQvdJptKTbNNXSDXbPXleuZ9Kf3NH R/5jW5OyO5NsCFBP0VKGQ/z6J7y6sekaLAx4y+cEfye24tCO9954z4nG2ObvpPxDihbd jnd0kW68v0xZmgPRAo5THMYMXQxzx7NxsI5m3MaMOg5vEk1AsPnnMi4chT9VopMKuWCu Ce3g== X-Gm-Message-State: AIkVDXK46Y2FpDrYjM7WqIV9tM/Qnh0bWT/ynrCbFP2WrY/fiOXlwHU6qg8AQS2bbpO+4Q== X-Received: by 10.84.213.150 with SMTP id g22mr67907498pli.11.1482854373471; Tue, 27 Dec 2016 07:59:33 -0800 (PST) Received: from localhost ([45.35.47.137]) by smtp.gmail.com with ESMTPSA id q14sm90649441pfa.40.2016.12.27.07.59.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 07:59:32 -0800 (PST) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , Hannes Reinecke , Mike Christie , Dan Williams , Toshi Kani , Damien Le Moal Subject: [PATCH v1 10/54] block: introduce flag QUEUE_FLAG_NO_MP Date: Tue, 27 Dec 2016 23:55:59 +0800 Message-Id: <1482854250-13481-11-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482854250-13481-1-git-send-email-tom.leiming@gmail.com> References: <1482854250-13481-1-git-send-email-tom.leiming@gmail.com> 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 MD(especially raid1 and raid10) is a bit difficult to support multipage bvec, so introduce this flag for not enabling multipage bvec, then MD can still accept singlepage bvec only, and once direct access to bvec table in MD are cleanuped, the flag can be removed. Signed-off-by: Ming Lei --- include/linux/blkdev.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 83695641bd5e..0c02d9778965 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -600,6 +600,7 @@ struct request_queue { #define QUEUE_FLAG_FLUSH_NQ 25 /* flush not queueuable */ #define QUEUE_FLAG_DAX 26 /* device supports DAX */ #define QUEUE_FLAG_STATS 27 /* track rq completion times */ +#define QUEUE_FLAG_NO_MP 28 /* multipage bvecs isn't ready */ #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ (1 << QUEUE_FLAG_STACKABLE) | \ @@ -690,6 +691,7 @@ static inline void queue_flag_clear(unsigned int flag, struct request_queue *q) #define blk_queue_secure_erase(q) \ (test_bit(QUEUE_FLAG_SECERASE, &(q)->queue_flags)) #define blk_queue_dax(q) test_bit(QUEUE_FLAG_DAX, &(q)->queue_flags) +#define blk_queue_no_mp(q) test_bit(QUEUE_FLAG_NO_MP, &(q)->queue_flags) #define blk_noretry_request(rq) \ ((rq)->cmd_flags & (REQ_FAILFAST_DEV|REQ_FAILFAST_TRANSPORT| \