From patchwork Sat Oct 29 08:08:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9403381 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 8E70F60587 for ; Sat, 29 Oct 2016 08:27:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B1282A1D0 for ; Sat, 29 Oct 2016 08:27:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FC5C2A1DD; Sat, 29 Oct 2016 08:27:43 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 2383E2A1D0 for ; Sat, 29 Oct 2016 08:27:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757003AbcJ2IOL (ORCPT ); Sat, 29 Oct 2016 04:14:11 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34853 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941917AbcJ2INm (ORCPT ); Sat, 29 Oct 2016 04:13:42 -0400 Received: by mail-pf0-f194.google.com with SMTP id s8so3380147pfj.2; Sat, 29 Oct 2016 01:13:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LpahfWWQj3Vw9lJIp32Gb2RwYVfE6MDJ54nt1RHGElU=; b=wdYsaT0/zMAfUUBqu4XyW8yOkRtNldiNr3H4sKC67MyDYsJXvPrZ+wwJaHBPw5ScaM TrL9UKKUvT6NOcYwl8Q1jSuED/Rw+FC/MrPG+JKTOFY7WWX6RMNyjYn822gbLaDQpBPx Auqvi5DHL0YF37BOGwYo+0p2R6M5qYx5vsCbVPLbsy5q43CBIVGXYiJ4d3vKtBoA+PFZ SgBNNZz9kNwDdCzspphxoefxFLXyoeAxL/GuBD3y9kW12nSvxSdlOeeHo9Lr7hA4OXuV f0xlrI/dZYNVAzNOcoyOkMp38+GgCfTIEaUSLwKVG2HTTwBn+RvaqfyVqNG4VRMf09fV nc1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LpahfWWQj3Vw9lJIp32Gb2RwYVfE6MDJ54nt1RHGElU=; b=bT5txuTROWWDKcS8VStZ3BBBH90NMTVDZbFGli82U696Cy8O3VKHWsi0CoYcwvcdDE 7rpopmfGP9TUvAnzIZMs01U/yhDwKkU6he8IJMmE06D4GrWhJBsdPrhnhf8ihSYKo49A wgmRSRkGz/UewUQLjT+jLf46FzJs3k18Zmbee8AmcEZXb0WM/EgdDYgj81XwvuPyjq2w QdGCDLrIXDb1YVuV+KlOZpAAPkNqJsZTL7PpAfxHjaBnmhYtO6kRqbS5aFfE3NNdBZNf uPpFdm4/7le2zyMSVoCKsJQBhwf7JHPqpyeoeEsCM1yHGloNhD9+oalDdVBok+aP2vPH O7HQ== X-Gm-Message-State: ABUngvf9EhZMLwR20lMn8c/cTAwREQ3cSTFaPbm4YD4N5N4DkWr891e9SGwpPflHCzH2bg== X-Received: by 10.98.56.149 with SMTP id f143mr2508763pfa.106.1477728821841; Sat, 29 Oct 2016 01:13:41 -0700 (PDT) Received: from localhost ([45.34.23.101]) by smtp.gmail.com with ESMTPSA id y2sm23510559pfk.54.2016.10.29.01.13.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Oct 2016 01:13:41 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , "Kirill A . Shutemov" , Ming Lei , Mike Christie , Hannes Reinecke , Dan Williams , Toshi Kani Subject: [PATCH 23/60] block: introduce flag QUEUE_FLAG_NO_MP Date: Sat, 29 Oct 2016 16:08:22 +0800 Message-Id: <1477728600-12938-24-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> References: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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 and other fs/drivers are cleanuped, the flag can be removed. BTRFS has the similar issue too. 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 c47c358ba052..e4dd25361bd6 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -505,6 +505,7 @@ struct request_queue { #define QUEUE_FLAG_FUA 24 /* device supports FUA writes */ #define QUEUE_FLAG_FLUSH_NQ 25 /* flush not queueuable */ #define QUEUE_FLAG_DAX 26 /* device supports DAX */ +#define QUEUE_FLAG_NO_MP 27 /* multipage bvecs isn't ready */ #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ (1 << QUEUE_FLAG_STACKABLE) | \ @@ -595,6 +596,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| \