public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/26] Prep work for immutable bio vecs
@ 2012-09-11  0:22 Kent Overstreet
  2012-09-11  0:22 ` [PATCH v2 01/26] block: Convert integrity to bvec_alloc_bs(), and a bugfix Kent Overstreet
                   ` (27 more replies)
  0 siblings, 28 replies; 81+ messages in thread
From: Kent Overstreet @ 2012-09-11  0:22 UTC (permalink / raw)
  To: linux-bcache, linux-kernel, dm-devel; +Cc: axboe, Kent Overstreet, tj, neilb

Random assortment of refactoring and trivial cleanups;

Immutable bio vecs and efficient bio splitting require auditing and
removing pretty much all bi_idx uses, among other things.

The reason is that with immutable bio vecs we can't use the bvec array
directly; if we have a partially completed bvec, that'll be indicated
with a field in struct bvec_iter (which gets embedded in struct bio) -
bi_bvec_done.

bio_for_each_segments() will handle this transparently, so code needs to
be converted to use it or some other generic accessor.

Also, bio splitting means that when a driver gets a bio, bi_idx and
bi_bvec_done may both be nonzero. Again, just need to use generic
accessors.

v2: Patch series now has all the prep work to be done before abstracting
out the bio iterator, I think.

Kent Overstreet (26):
  block: Convert integrity to bvec_alloc_bs(), and a bugfix
  block: Add bio_advance()
  block: Refactor blk_update_request()
  md: Convert md_trim_bio() to use bio_advance()
  block: Add bio_end()
  block: Use bio_sectors() more consistently
  block: Don't use bi_idx in bio_split() or require it to be 0
  block: Remove bi_idx references
  block: Remove some unnecessary bi_vcnt usage
  block: Add submit_bio_wait(), remove from md
  raid10: Use bio_reset()
  raid1: use bio_reset()
  raid5: use bio_reset()
  raid1: Refactor narrow_write_error() to not use bi_idx
  block: Add bio_copy_data()
  pktcdvd: use bio_copy_data()
  pktcdvd: Use bio_reset() in disabled code to kill bi_idx usage
  raid1: use bio_copy_data()
  bounce: Refactor __blk_queue_bounce to not use bi_io_vec
  block: Add bio_for_each_segment_all()
  block: Convert some code to bio_for_each_segment_all()
  block: Add bio_alloc_pages()
  raid1: use bio_alloc_pages()
  block: Add an explicit bio flag for bios that own their bvec
  bio-integrity: Add explicit field for owner of bip_buf
  block: Add BIO_SUBMITTED flag, kill BIO_CLONED

 block/blk-core.c                         |  88 +++---------
 block/cfq-iosched.c                      |   7 +-
 block/deadline-iosched.c                 |   2 +-
 drivers/block/aoe/aoeblk.c               |   2 +-
 drivers/block/aoe/aoecmd.c               |   2 +-
 drivers/block/brd.c                      |   3 +-
 drivers/block/drbd/drbd_req.c            |   8 +-
 drivers/block/floppy.c                   |   1 -
 drivers/block/pktcdvd.c                  | 102 ++++----------
 drivers/block/ps3vram.c                  |   2 +-
 drivers/md/dm-crypt.c                    |   3 +-
 drivers/md/dm-raid1.c                    |   2 +-
 drivers/md/dm-stripe.c                   |   2 +-
 drivers/md/dm-verity.c                   |   4 +-
 drivers/md/dm.c                          |   1 -
 drivers/md/faulty.c                      |   6 +-
 drivers/md/linear.c                      |   3 +-
 drivers/md/md.c                          |  19 +--
 drivers/md/raid0.c                       |   9 +-
 drivers/md/raid1.c                       | 131 ++++++------------
 drivers/md/raid10.c                      |  78 +++--------
 drivers/md/raid5.c                       |  50 +++----
 drivers/message/fusion/mptsas.c          |   6 +-
 drivers/s390/block/dcssblk.c             |   3 +-
 drivers/scsi/libsas/sas_expander.c       |   6 +-
 drivers/scsi/mpt2sas/mpt2sas_transport.c |  10 +-
 fs/bio-integrity.c                       | 134 ++++++------------
 fs/bio.c                                 | 226 +++++++++++++++++++++++++++----
 fs/btrfs/extent_io.c                     |   3 +-
 fs/buffer.c                              |   1 -
 fs/direct-io.c                           |   8 +-
 fs/exofs/ore.c                           |   2 +-
 fs/exofs/ore_raid.c                      |   2 +-
 fs/gfs2/lops.c                           |   2 +-
 fs/jfs/jfs_logmgr.c                      |   2 -
 fs/logfs/dev_bdev.c                      |   5 -
 include/linux/bio.h                      |  34 +++--
 include/linux/blk_types.h                |   3 +-
 include/trace/events/block.h             |  10 +-
 mm/bounce.c                              |  75 +++-------
 mm/page_io.c                             |   1 -
 41 files changed, 471 insertions(+), 587 deletions(-)

-- 
1.7.12


^ permalink raw reply	[flat|nested] 81+ messages in thread
* [PATCH v4 00/24] Prep work for immutable bio vecs
@ 2012-10-15 20:08 Kent Overstreet
  2012-10-15 20:09 ` [PATCH v2 25/26] bio-integrity: Add explicit field for owner of bip_buf Kent Overstreet
  0 siblings, 1 reply; 81+ messages in thread
From: Kent Overstreet @ 2012-10-15 20:08 UTC (permalink / raw)
  To: linux-bcache, linux-kernel, dm-devel
  Cc: Kent Overstreet, tj, axboe, neilb, vgoyal

Since last time - split bio integrity stuff out into its own 2 patch series.

Also changed bio_advance() a bit - it now explicitly special cases discard and
WRITE_SAME requests, so that partial completions will work. Previously, partial
completions worked for other requests but would've silently blown up for those
- this'll be of use later too, for generic bio splitting.

I've got 3 patch series queued up but they all should be independent - git tree
is at

http://evilpiepirate.org/git/linux-bcache.git for-jens

It's on top of jens' for-next branch.


Kent Overstreet (24):
  block: Add bio_advance()
  block: Refactor blk_update_request()
  md: Convert md_trim_bio() to use bio_advance()
  block: Add bio_end_sector()
  block: Use bio_sectors() more consistently
  block: Change bio_split() to respect the current value of bi_idx
  block: Remove bi_idx references
  block: Remove some unnecessary bi_vcnt usage
  block: Add submit_bio_wait(), remove from md
  raid10: Use bio_reset()
  raid1: use bio_reset()
  raid5: use bio_reset()
  raid1: Refactor narrow_write_error() to not use bi_idx
  block: Add bio_copy_data()
  pktcdvd: use bio_copy_data()
  pktcdvd: Use bio_reset() in disabled code to kill bi_idx usage
  raid1: use bio_copy_data()
  bounce: Refactor __blk_queue_bounce to not use bi_io_vec
  block: Add bio_for_each_segment_all()
  block: Convert some code to bio_for_each_segment_all()
  block: Add bio_alloc_pages()
  block: Add an explicit bio flag for bios that own their bvec
  bio-integrity: Add explicit field for owner of bip_buf
  block: Add BIO_SUBMITTED flag, kill BIO_CLONED

 block/blk-core.c                         |  84 ++----------
 block/cfq-iosched.c                      |   7 +-
 block/deadline-iosched.c                 |   2 +-
 drivers/block/aoe/aoeblk.c               |   2 +-
 drivers/block/aoe/aoecmd.c               |   2 +-
 drivers/block/brd.c                      |   3 +-
 drivers/block/drbd/drbd_req.c            |   8 +-
 drivers/block/floppy.c                   |   1 -
 drivers/block/pktcdvd.c                  | 102 ++++----------
 drivers/md/dm-crypt.c                    |   3 +-
 drivers/md/dm-raid1.c                    |   2 +-
 drivers/md/dm-stripe.c                   |   2 +-
 drivers/md/dm-verity.c                   |   4 +-
 drivers/md/dm.c                          |   1 -
 drivers/md/faulty.c                      |   6 +-
 drivers/md/linear.c                      |   3 +-
 drivers/md/md.c                          |  17 +--
 drivers/md/raid0.c                       |   9 +-
 drivers/md/raid1.c                       | 133 ++++++------------
 drivers/md/raid10.c                      |  78 +++--------
 drivers/md/raid5.c                       |  49 ++++---
 drivers/message/fusion/mptsas.c          |   6 +-
 drivers/s390/block/dcssblk.c             |   3 +-
 drivers/scsi/libsas/sas_expander.c       |   6 +-
 drivers/scsi/mpt2sas/mpt2sas_transport.c |  10 +-
 fs/bio-integrity.c                       |  10 +-
 fs/bio.c                                 | 226 +++++++++++++++++++++++++++----
 fs/btrfs/extent_io.c                     |   3 +-
 fs/buffer.c                              |   1 -
 fs/direct-io.c                           |   8 +-
 fs/exofs/ore.c                           |   2 +-
 fs/exofs/ore_raid.c                      |   2 +-
 fs/gfs2/lops.c                           |   2 +-
 fs/jfs/jfs_logmgr.c                      |   2 -
 fs/logfs/dev_bdev.c                      |   5 -
 include/linux/bio.h                      |  29 ++--
 include/linux/blk_types.h                |   5 +-
 include/trace/events/block.h             |  10 +-
 mm/bounce.c                              |  75 +++-------
 mm/page_io.c                             |   1 -
 40 files changed, 424 insertions(+), 500 deletions(-)

-- 
1.7.12


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

end of thread, other threads:[~2012-10-15 20:11 UTC | newest]

Thread overview: 81+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-11  0:22 [PATCH v2 00/26] Prep work for immutable bio vecs Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 01/26] block: Convert integrity to bvec_alloc_bs(), and a bugfix Kent Overstreet
2012-09-11 20:36   ` [dm-devel] " Vivek Goyal
2012-09-11 20:48     ` Kent Overstreet
2012-09-11 22:07     ` Kent Overstreet
2012-09-12 19:39       ` Martin K. Petersen
2012-09-17 21:08         ` Kent Overstreet
2012-09-20 21:53   ` Tejun Heo
2012-09-11  0:22 ` [PATCH v2 02/26] block: Add bio_advance() Kent Overstreet
2012-09-20 21:58   ` Tejun Heo
2012-09-20 23:13     ` Kent Overstreet
2012-09-20 23:25       ` Tejun Heo
2012-09-20 23:38         ` Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 03/26] block: Refactor blk_update_request() Kent Overstreet
2012-09-20 23:20   ` Tejun Heo
2012-09-20 23:36     ` Kent Overstreet
2012-09-20 23:41       ` Tejun Heo
2012-09-20 23:50         ` Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 04/26] md: Convert md_trim_bio() to use bio_advance() Kent Overstreet
2012-09-20 23:27   ` Tejun Heo
2012-09-11  0:22 ` [PATCH v2 05/26] block: Add bio_end() Kent Overstreet
2012-09-17  9:17   ` Steven Whitehouse
2012-09-20 23:32   ` Tejun Heo
2012-09-20 23:44     ` Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 06/26] block: Use bio_sectors() more consistently Kent Overstreet
2012-09-20 23:36   ` Tejun Heo
2012-09-20 23:47     ` Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 07/26] block: Don't use bi_idx in bio_split() or require it to be 0 Kent Overstreet
2012-09-20 23:45   ` Tejun Heo
2012-09-21  0:00     ` Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 08/26] block: Remove bi_idx references Kent Overstreet
2012-09-20 23:49   ` Tejun Heo
2012-09-21  0:04     ` Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 09/26] block: Remove some unnecessary bi_vcnt usage Kent Overstreet
2012-09-20 23:51   ` Tejun Heo
2012-09-11  0:22 ` [PATCH v2 10/26] block: Add submit_bio_wait(), remove from md Kent Overstreet
2012-09-20 23:56   ` Tejun Heo
2012-09-21  0:06     ` Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 11/26] raid10: Use bio_reset() Kent Overstreet
2012-09-20 23:59   ` Tejun Heo
2012-09-11  0:22 ` [PATCH v2 12/26] raid1: use bio_reset() Kent Overstreet
2012-09-11  4:59   ` NeilBrown
2012-09-11 18:28     ` Kent Overstreet
2012-09-11 21:17       ` NeilBrown
2012-09-11  0:22 ` [PATCH v2 13/26] raid5: " Kent Overstreet
2012-09-11  5:03   ` NeilBrown
2012-09-11 19:26     ` Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 14/26] raid1: Refactor narrow_write_error() to not use bi_idx Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 15/26] block: Add bio_copy_data() Kent Overstreet
2012-09-21  0:06   ` Tejun Heo
2012-09-21  0:09     ` Kent Overstreet
2012-09-21  0:15       ` Tejun Heo
2012-09-21  0:09     ` Tejun Heo
2012-09-21  0:13       ` Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 16/26] pktcdvd: use bio_copy_data() Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 17/26] pktcdvd: Use bio_reset() in disabled code to kill bi_idx usage Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 18/26] raid1: use bio_copy_data() Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 19/26] bounce: Refactor __blk_queue_bounce to not use bi_io_vec Kent Overstreet
2012-09-21  0:25   ` Tejun Heo
2012-09-21  0:29     ` Kent Overstreet
2012-09-21  0:27   ` Tejun Heo
2012-09-21  0:34     ` Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 20/26] block: Add bio_for_each_segment_all() Kent Overstreet
2012-09-21  0:35   ` Tejun Heo
2012-09-11  0:22 ` [PATCH v2 21/26] block: Convert some code to bio_for_each_segment_all() Kent Overstreet
2012-09-21  0:38   ` Tejun Heo
2012-09-21  0:50     ` Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 22/26] block: Add bio_alloc_pages() Kent Overstreet
2012-09-21  0:47   ` Tejun Heo
2012-09-21  4:50     ` Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 23/26] raid1: use bio_alloc_pages() Kent Overstreet
2012-09-21  0:48   ` Tejun Heo
2012-09-21  4:51     ` Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 24/26] block: Add an explicit bio flag for bios that own their bvec Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 25/26] bio-integrity: Add explicit field for owner of bip_buf Kent Overstreet
2012-09-12 19:41   ` Martin K. Petersen
2012-09-17 21:09     ` Kent Overstreet
2012-09-11  0:22 ` [PATCH v2 26/26] block: Add BIO_SUBMITTED flag, kill BIO_CLONED Kent Overstreet
2012-09-11  5:22 ` [PATCH v2 00/26] Prep work for immutable bio vecs NeilBrown
2012-09-20 23:22 ` Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2012-10-15 20:08 [PATCH v4 00/24] " Kent Overstreet
2012-10-15 20:09 ` [PATCH v2 25/26] bio-integrity: Add explicit field for owner of bip_buf Kent Overstreet

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