From patchwork Sat Oct 29 08:08:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9403403 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 A6A1F60587 for ; Sat, 29 Oct 2016 08:28:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9245D2A1EA for ; Sat, 29 Oct 2016 08:28:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85A512A63F; Sat, 29 Oct 2016 08:28:50 +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 362E72A1EA for ; Sat, 29 Oct 2016 08:28:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933378AbcJ2I2t (ORCPT ); Sat, 29 Oct 2016 04:28:49 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34630 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S942602AbcJ2IN6 (ORCPT ); Sat, 29 Oct 2016 04:13:58 -0400 Received: by mail-pf0-f194.google.com with SMTP id u84so3378821pfj.1; Sat, 29 Oct 2016 01:13:58 -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=llTLAbMxsrw1c654ceLALq3cdstrrquXZrbu6XZNyUM=; b=vCjXlwLyaXtCemQffFja5KzERe8sN7R88jS6qJQsXWC40A6H+oVGcwyVTjBllPaEWL BmIZIFarY8KPa0cmyNAuEdPoMiimur9x1AaK17iSs9nIgvsCz+8nk/ris35UitgrQUsZ Ov9nGBYhjebZF39TF6Fw9/M9/xU6CaiPmZUGSwGSlcFp4AB/3PGTsILDwIoDv1gwzVL/ J+2Qa6uZuGBuZp2MNq2i7rUrGwt0qLqzCqm/PSZ8z+wGvNqW80ZGHg9pfZTfU32yk4Sq 0cgORATXr2oESycFkFlEKt6Vc+Y2wSU9CUoSElI0KUCfPaQio3wxT5Rq00pD34W+wdQz Dv5Q== 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=llTLAbMxsrw1c654ceLALq3cdstrrquXZrbu6XZNyUM=; b=MCQJtLN/3uIMMLsqQGO6ftjPTZoqhb9hmhhEXDpYGaO4pyx/JwWa/ipSOxf2K5ZsxI OV2xb2JAA6o/Z9yl7+xcqTrmNTlzNc3nW0v09SKSTwM2m2iGZGcPam4ws79htMphjxNb eCb6RReMOUWc2a6gNXa7PH1JcF4jEQV1rmDPnQq2oS+5EAnfgAgJ/ZmaKm331M5ylXmF jiyrSm0KfIThXw0vKCNLyBaRk7RiufDFyjhZhkGZMwTa0qwaL8ZJnZarVpNObVy9bdAp hMgETWDxXnTASu492rqyAlzZ70+6UCRa6b/s40LHPRhjvMaIIGp4CWWk+Uv70x/ZLlSe yFoQ== X-Gm-Message-State: ABUngvfCe2/t6ztB9RqBKHUqetc3Midma5xDtar7R9o8u8eMjV5/fZiXdrkLNAslSJaS2A== X-Received: by 10.99.105.72 with SMTP id e69mr26431199pgc.158.1477728837760; Sat, 29 Oct 2016 01:13:57 -0700 (PDT) Received: from localhost ([45.34.23.101]) by smtp.gmail.com with ESMTPSA id d26sm23530570pfb.37.2016.10.29.01.13.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Oct 2016 01:13:57 -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 , Keith Busch , Mike Snitzer Subject: [PATCH 27/60] block: introduce BIO_SP_MAX_SECTORS Date: Sat, 29 Oct 2016 16:08:26 +0800 Message-Id: <1477728600-12938-28-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-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This macro is needed when one multipage bvec based bio is converted to singlepage bvec based bio, for example, bio bounce requires singlepage bvec. Signed-off-by: Ming Lei --- include/linux/bio.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/bio.h b/include/linux/bio.h index 8634bd24984c..fa71f6a57f81 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -40,6 +40,9 @@ #define BIO_MAX_PAGES 256 +/* Max sectors of bio with singlepage bvec */ +#define BIO_SP_MAX_SECTORS (BIO_MAX_PAGES * (PAGE_SIZE >> 9)) + #define bio_prio(bio) (bio)->bi_ioprio #define bio_set_prio(bio, prio) ((bio)->bi_ioprio = prio)