From patchwork Tue Dec 27 15:55:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9489389 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 7B8A562AAD for ; Tue, 27 Dec 2016 16:00:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C33B200E7 for ; Tue, 27 Dec 2016 16:00:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FF3D2094F; Tue, 27 Dec 2016 16:00:44 +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 06CC5200E7 for ; Tue, 27 Dec 2016 16:00:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755360AbcL0QAj (ORCPT ); Tue, 27 Dec 2016 11:00:39 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33937 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752721AbcL0P7v (ORCPT ); Tue, 27 Dec 2016 10:59:51 -0500 Received: by mail-pf0-f195.google.com with SMTP id y68so18347599pfb.1; Tue, 27 Dec 2016 07:59:26 -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=UQZFQooXPrVo73RiMk4HsQHgKFX5KJxYH65x0Sd8S2Y=; b=inLTSPHSkMZWEGPgXRITbrYVCJBXzXra5bJ7/x/jarZ2k7kTkUfVwRfOfj1SACGSJ0 SHae0mMkcUUioXXfMMV9G2Ow3R5Nvqcg6K5sk5iZKH24q3xAxSbVtCioOx+RFPFOCVkH 228r8oW6BA7aiSVeBwiNwo2lQ/oTwRvoGUmzt4EjLqnrPmhy5makSWMPEAyCIFaQcm1M nxjQjI8xB8ZOgsSV/Yn4nTK+SPsKybY29i/nidJ0rgEp6DB96Yx13X2SXo4wkRfZ0J2h V0W3CVQGNGOlb+wfOQLOjCvdx0V4AyJxhm8DBMbFUSB2fZdWa9YrCjTreUCii9rTFndw EKxQ== 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=UQZFQooXPrVo73RiMk4HsQHgKFX5KJxYH65x0Sd8S2Y=; b=VfVntRde3kn6/j5ukAiTC76UF/CHblPhqOgP4InBAICvv4Jrxr8HJ5WcndFNfxKIlX UZiWdJD7ouxhHHO5JQ/5Lz99KTDAENJhNl/EJRMhZDCpT2HPtxIeC4vitqhQR/lU6QiA WX66zc5Kqnu3av19NkrBspD3Gxey4vhnHjG0NsSABEhmGIqlqfKa8UJI6MRkfuQS8mty UaMCqi4EiDuW9SBFnDYWxaDMcj4SNFE1ehBLlPJvuLHXJvs8azusqLZV6PakGZVAGkGX oZv4rDGHAImZEPEwr0tmC9mT8qmVrxRWfkctpaTxH7cI1BHKXTn4tnC3ipB1Uwxsq+IX sUgA== X-Gm-Message-State: AIkVDXJ0ngRfYRhq1xqxepg1OvcegjDnQv39GKx3d5R53jZV64av7dBLTqTwpNWxcmQxaA== X-Received: by 10.99.138.68 with SMTP id y65mr59065300pgd.117.1482854366370; Tue, 27 Dec 2016 07:59:26 -0800 (PST) Received: from localhost ([45.35.47.137]) by smtp.gmail.com with ESMTPSA id v82sm90716533pfi.6.2016.12.27.07.59.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 07:59:25 -0800 (PST) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , Jens Axboe Subject: [PATCH v1 09/54] block: comment on bio_iov_iter_get_pages() Date: Tue, 27 Dec 2016 23:55:58 +0800 Message-Id: <1482854250-13481-10-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 bio_iov_iter_get_pages() used unused bvec spaces for storing page pointer array temporarily, and this patch comments on this usage wrt. multipage bvec support. Signed-off-by: Ming Lei --- block/bio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/block/bio.c b/block/bio.c index d4a1e0b63ea0..10398969353b 100644 --- a/block/bio.c +++ b/block/bio.c @@ -859,6 +859,10 @@ EXPORT_SYMBOL(bio_add_page); * * Pins as many pages from *iter and appends them to @bio's bvec array. The * pages will have to be released using put_page() when done. + * + * The hacking way of using bvec table as page pointer array is safe + * even after multipage bvec is introduced because that space can be + * thought as unused by bio_add_page(). */ int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter) {