Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754865AbaLVLwZ (ORCPT ); Mon, 22 Dec 2014 06:52:25 -0500 Received: from mail-wi0-f179.google.com ([209.85.212.179]:40665 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754132AbaLVLum (ORCPT ); Mon, 22 Dec 2014 06:50:42 -0500 From: Dongsu Park To: linux-kernel@vger.kernel.org Cc: Jens Axboe , Kent Overstreet , Ming Lin , Dongsu Park , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [RFC PATCH 17/17] Documentation: update notes in biovecs about arbitrarily sized bios Date: Mon, 22 Dec 2014 12:48:44 +0100 Message-Id: X-Mailer: git-send-email 2.1.0 In-Reply-To: <4287748e7d1a0fce1c951567a7688821f1a21e5e.1419241597.git.dongsu.park@profitbricks.com> References: <83a9ee8a309f8e08490c5dd715a608ea054f5c33.1419241597.git.dongsu.park@profitbricks.com> <0b6ba533a64aec98e8447bfd30c6622d0729d12e.1419241597.git.dongsu.park@profitbricks.com> <4334b90a56b96ad7a11e4ba7eb97c2cf4405950d.1419241597.git.dongsu.park@profitbricks.com> <4287748e7d1a0fce1c951567a7688821f1a21e5e.1419241597.git.dongsu.park@profitbricks.com> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update block/biovecs.txt so that it includes a note on what kind of effects arbitrarily sized bios would bring to the block layer. Also fix a trivial typo, bio_iter_iovec. Signed-off-by: Dongsu Park Cc: Kent Overstreet Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org --- Documentation/block/biovecs.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Documentation/block/biovecs.txt b/Documentation/block/biovecs.txt index 74a32ad..339045d 100644 --- a/Documentation/block/biovecs.txt +++ b/Documentation/block/biovecs.txt @@ -24,7 +24,7 @@ particular, presenting the illusion of partially completed biovecs so that normal code doesn't have to deal with bi_bvec_done. * Driver code should no longer refer to biovecs directly; we now have - bio_iovec() and bio_iovec_iter() macros that return literal struct biovecs, + bio_iovec() and bio_iter_iovec() macros that return literal struct biovecs, constructed from the raw biovecs but taking into account bi_bvec_done and bi_size. @@ -109,3 +109,18 @@ Other implications: over all the biovecs in the new bio - which is silly as it's not needed. So, don't use bi_vcnt anymore. + + * As of 3.18, block layer is written based on merging biovecs. Its goal is + to avoid having to split bios; upper layer code such as bio_add_page() + checks what the underlying device can handle, and tries to always create + bios that don't need to be split. However, this approach has been actually + cumbersome and error-prone. It eventually breaks down with stacked devices + and devices with dynamic limits, which then adds a lot of complexity. + + So its new interface allows the block layer to split bios as needed, so we + could eliminate a lot of complexity elsewhere - particularly in stacked + drivers. Code that creates bios can then create whatever size bios are + convenient, and more importantly stacked drivers don't have to deal with + both their own bio size limitations and the limitations of the underlying + devices. Thus there's no need to define ->merge_bvec_fn() callbacks for + individual block drivers. -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/