Message ID | 20190121081805.32727-17-ming.lei@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C2451390 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 21 Jan 2019 08:22:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D84A29DC8 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 21 Jan 2019 08:22:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 318F629EEE; Mon, 21 Jan 2019 08:22:21 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4C8A29EEA for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 21 Jan 2019 08:22:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DC61E8E0036; Mon, 21 Jan 2019 03:22:19 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D9AD38E0025; Mon, 21 Jan 2019 03:22:19 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C8A3C8E0036; Mon, 21 Jan 2019 03:22:19 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by kanga.kvack.org (Postfix) with ESMTP id 9E8F38E0025 for <linux-mm@kvack.org>; Mon, 21 Jan 2019 03:22:19 -0500 (EST) Received: by mail-qk1-f197.google.com with SMTP id w185so18690742qka.9 for <linux-mm@kvack.org>; Mon, 21 Jan 2019 00:22:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=AFBqz180RnaH0e+e3HwEp17wlMlBCtNionbxJZAMblc=; b=XNGk94WkFg5XMqfbw3dh6Ea1tSaPcsU9JYbFaMijv5oEpIHYgHCSj2iGSAhE9vw5uw Sy6K0CqBkfawl2NM/JUTWFXq/y7P2cWXkYG/PVmBt6eL967u5iGtFMkwVgXBqTNo+0kV G6ZkLxxDJe07SYkv/9a8o2swHqRtqYYlO/p6FZAr4ox+bJVdIZsnAVVJ8JDY3fWS2ywb +jVi1IrnCfabzsh2mIPuLbaeM+ONdpLrcfctLzhDNU3MR4c2i+5PXTR/T3S/UKOyPZ8G g5bkvpiLpQ4U2ovj5A1SlSEAdHiW9HYZV3bR3eA0nBXve2/zTfIiOmUiOwmi/UD/Eymb S2xg== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: AJcUukc0qLY8KpyQcvecfcQcapj5yHzx1SeGTNaKg6IFOoSlS2Ge9NgV lVw3kFCd8tR0HniuyY6QCFsJfV4RgfcveVvHLg+Et+Z+oKStfTX+/n5l2cj81grxGJrEFTQmQzv ND4Lr7worclIsGMK/f8ubXKPlfIqJa+XbbcaOUDRDaraIVp0soGpT4s8D6oi/FQ8bCg== X-Received: by 2002:a0c:e8cc:: with SMTP id m12mr25547481qvo.186.1548058939414; Mon, 21 Jan 2019 00:22:19 -0800 (PST) X-Google-Smtp-Source: ALg8bN6ndUP+tzRDVQpTesoXGxdzZV4S5G8iIAeg6DLyAoU/fJ+pm/64mDn04KIi4Iis+OKSzyM4 X-Received: by 2002:a0c:e8cc:: with SMTP id m12mr25547464qvo.186.1548058938870; Mon, 21 Jan 2019 00:22:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548058938; cv=none; d=google.com; s=arc-20160816; b=t98jL/KtqqVtZLG3pG/mV2F+szAmE907uN9cD6oI9YyOg3wI8SzZbP1XDF+9W8Za4Z 788KgBeJwu0SQZflpJCpS+fjEPp7f5hERQFbPEULdIEbLGJVhD/juc59T3i6Y5xhjWFi UikJ5Qo8Gi/tkXLHgPSjPOfU1P4XA+9dS0yB+nPbwRPpCr/lbJDu+rgB4CFXeGSJFFKF MDZDF0SUySPF/t0n4vYKA1xeL7d6zfASMsJc7EC1FoPzDNOQSZ5zKUIPSm7U7XklgW/0 ItSzwtxI6RnF/BISgFcTWg3stNRyxAasKXq+GZ1/9ZryV/4QjHk5lZM+VUncCTFJGYdS EKIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=AFBqz180RnaH0e+e3HwEp17wlMlBCtNionbxJZAMblc=; b=FV503PpEJNQUCcFL6KjeiBqFN6SQWg0jhzULerdlk8b6M4vgcyAwfp5SmQm3+XPhPR LShl24GxsFX4ijGrym96O3UnBbf5Hv7lrrO5znah+RPELrbg0KaREnA3CU7ozSRrvkp2 rMmG0mu0n44rpBOfWl52CGoPlvSGV+18bsH1sgvyl+TIDYM+Mgsjd1bFX8Mi50bdNEd5 Czu5rwndjZl3KvaFOdyFZQEzWgMdNDL+GiOkRHTFEnKyfrBGytz7HcCOrxaUYFbcuCo7 I+bK12MRBZsinxa8fEPWqV1n/OYbg1W1g9YQ5A4zLCr3X/NWIIpB09Q9N56j+o3sOe4J Sd6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id k60si1995935qtd.396.2019.01.21.00.22.18 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jan 2019 00:22:18 -0800 (PST) Received-SPF: pass (google.com: domain of ming.lei@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D46B687629; Mon, 21 Jan 2019 08:22:17 +0000 (UTC) Received: from localhost (ovpn-8-22.pek2.redhat.com [10.72.8.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 17C405D9C9; Mon, 21 Jan 2019 08:22:06 +0000 (UTC) From: Ming Lei <ming.lei@redhat.com> To: Jens Axboe <axboe@kernel.dk> Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Theodore Ts'o <tytso@mit.edu>, Omar Sandoval <osandov@fb.com>, Sagi Grimberg <sagi@grimberg.me>, Dave Chinner <dchinner@redhat.com>, Kent Overstreet <kent.overstreet@gmail.com>, Mike Snitzer <snitzer@redhat.com>, dm-devel@redhat.com, Alexander Viro <viro@zeniv.linux.org.uk>, linux-fsdevel@vger.kernel.org, linux-raid@vger.kernel.org, David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org, "Darrick J . Wong" <darrick.wong@oracle.com>, linux-xfs@vger.kernel.org, Gao Xiang <gaoxiang25@huawei.com>, Christoph Hellwig <hch@lst.de>, linux-ext4@vger.kernel.org, Coly Li <colyli@suse.de>, linux-bcache@vger.kernel.org, Boaz Harrosh <ooo@electrozaur.com>, Bob Peterson <rpeterso@redhat.com>, cluster-devel@redhat.com, Ming Lei <ming.lei@redhat.com> Subject: [PATCH V14 16/18] block: document usage of bio iterator helpers Date: Mon, 21 Jan 2019 16:18:03 +0800 Message-Id: <20190121081805.32727-17-ming.lei@redhat.com> In-Reply-To: <20190121081805.32727-1-ming.lei@redhat.com> References: <20190121081805.32727-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 21 Jan 2019 08:22:18 +0000 (UTC) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
block: support multi-page bvec
|
expand
|
diff --git a/Documentation/block/biovecs.txt b/Documentation/block/biovecs.txt index 25689584e6e0..4a466bcb9611 100644 --- a/Documentation/block/biovecs.txt +++ b/Documentation/block/biovecs.txt @@ -117,3 +117,28 @@ Other implications: size limitations and the limitations of the underlying devices. Thus there's no need to define ->merge_bvec_fn() callbacks for individual block drivers. + +Usage of helpers: +================= + +* The following helpers whose names have the suffix of "_all" can only be used +on non-BIO_CLONED bio. They are usually used by filesystem code. Drivers +shouldn't use them because the bio may have been split before it reached the +driver. + + bio_for_each_segment_all() + bio_first_bvec_all() + bio_first_page_all() + bio_last_bvec_all() + +* The following helpers iterate over single-page segment. The passed 'struct +bio_vec' will contain a single-page IO vector during the iteration + + bio_for_each_segment() + bio_for_each_segment_all() + +* The following helpers iterate over multi-page bvec. The passed 'struct +bio_vec' will contain a multi-page IO vector during the iteration + + bio_for_each_mp_bvec() + rq_for_each_mp_bvec()