From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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> 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-kernel-owner@vger.kernel.org List-ID: 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) -- 2.7.4