mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Immutable biovecs
@ 2013-03-27 17:39 Kent Overstreet
  2013-03-27 17:39 ` [PATCH 01/22] block: Abstract out bvec iterator Kent Overstreet
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: Kent Overstreet @ 2013-03-27 17:39 UTC (permalink / raw)
  To: axboe, linux-kernel, linux-fsdevel, dm-devel; +Cc: tj, neilb

This patch series implements immutable biovecs, and converts drivers to
the new primitives.

This is done by pulling bi_sector, bi_size and bi_idx out of struct bio
into a new iterator; to that we add bi_bvec_done which indicates the
number of bytes done in the current bvec.

This means we can create a bio that points to an arbitrary byte range in
an existing biovec; if we have a preexisting biovec that points to 4
whole pages, we can create a bio that points to the first 512 bytes of
the second bvec.

This enables easy and efficient splitting of arbitrary size bios; future
patches on top of this are going to convert the existing bio_split() in
fs/bio.c and remove the single bvec restriction.

This patch series does the necessary driver conversions so that a)
they're not modifying the biovec anymore (except whey're they've
explicitly cloned it, as in mm/bounce.c) and b) they always respect the
values of bi_idx and bi_bvec_done when the bio was passed to them - i.e.
you can submit partially completed bios to generic_make_request().

The intention is to then use this to make generic_make_request() accept
arbitrary size bios, splitting them as needed by the underlying device.
This enables a whole host of cleanups; we can get rid of merge_bvec_fn
(that's over 1000 lines of code deleted right there), bio_add_page()
becomes trivial (a lot of code becomes simpler if it doesn't have to
deal with bio_add_page() failing) - and I've also got a rewrite of the
dio code that depends on this, and shrinks direct-io.c to 650 lines,
drastically simplifying it and making it quite a bit faster too.


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2013-03-27 17:47 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-27 17:39 Immutable biovecs Kent Overstreet
2013-03-27 17:39 ` [PATCH 01/22] block: Abstract out bvec iterator Kent Overstreet
2013-03-27 17:39 ` [PATCH 02/22] dm: Use bvec_iter for dm_bio_record() Kent Overstreet
2013-03-27 17:39 ` [PATCH 03/22] block: Convert bio_iovec() to bvec_iter Kent Overstreet
2013-03-27 17:39 ` [PATCH 05/22] block: Immutable bio vecs Kent Overstreet
2013-03-27 17:39 ` [PATCH 06/22] aoe: Convert to bvec_iter Kent Overstreet
2013-03-27 17:39 ` [PATCH 07/22] dm-verity: convert to bvec iter Kent Overstreet
2013-03-27 17:39 ` [PATCH 08/22] block: Convert bio_copy_data() to bvec_iter Kent Overstreet
2013-03-27 17:39 ` [PATCH 09/22] bio-integrity: Convert " Kent Overstreet
2013-03-27 17:39 ` [PATCH 10/22] dm-crypt: " Kent Overstreet
2013-03-27 17:39 ` [PATCH 11/22] dm-io: Convert DM_IO_BVEC -> DM_IO_BIO Kent Overstreet
2013-03-27 17:39 ` [PATCH 12/22] umem: Convert to bvec_iter Kent Overstreet
2013-03-27 17:39 ` [PATCH 13/22] ceph: " Kent Overstreet
2013-03-27 17:39 ` [PATCH 14/22] block: Kill __BVEC_END, __BVEC_START Kent Overstreet
2013-03-27 17:39 ` [PATCH 15/22] block: Kill bio_iovec_idx(), __bio_iovec() Kent Overstreet
2013-03-27 17:39 ` [PATCH 16/22] rbd: Refactor bio cloning, don't clone biovecs Kent Overstreet
2013-03-27 17:39 ` [PATCH 17/22] dm: Refactor for new bio cloning/splitting Kent Overstreet
2013-03-27 17:39 ` [PATCH 18/22] block: Kill bio_sector_offset() Kent Overstreet
2013-03-27 17:39 ` [PATCH 19/22] md: Immutable bvecs Kent Overstreet
2013-03-27 17:39 ` [PATCH 20/22] dm: Don't save bvec anymore Kent Overstreet
2013-03-27 17:39 ` [PATCH 21/22] block: Don't save bvec in bio_map_data Kent Overstreet
2013-03-27 17:39 ` [PATCH 22/22] block: Don't copy bvecs when cloning bios, just share them Kent Overstreet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®