[PATCH v5 11/11] Documentation: update notes in biovecs about arbitrarily sized bios

2015-07-06 Thread mlin
From: Dongsu Park 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. Cc: Christoph Hellwig Cc: Kent Overstreet Cc: Jonathan Corbet Cc: linux-...@vger.kernel.org

[PATCH v5 05/11] block: remove split code in blkdev_issue_discard

2015-07-06 Thread mlin
From: Ming Lin The split code in blkdev_issue_discard() can go away now that any driver that cares does the split. Signed-off-by: Ming Lin --- block/blk-lib.c | 73 +++-- 1 file changed, 14 insertions(+), 59 deletions(-) diff --git

[PATCH v5 10/11] block: remove bio_get_nr_vecs()

2015-07-06 Thread mlin
From: Kent Overstreet We can always fill up the bio now, no need to estimate the possible size based on queue parameters. Signed-off-by: Kent Overstreet [hch: rebased and wrote a changelog] Signed-off-by: Christoph Hellwig Signed-off-by: Ming Lin --- block/bio.c| 23

[PATCH v5 03/11] bcache: remove driver private bio splitting code

2015-07-06 Thread mlin
From: Kent Overstreet The bcache driver has always accepted arbitrarily large bios and split them internally. Now that every driver must accept arbitrarily large bios this code isn't nessecary anymore. Cc: linux-bca...@vger.kernel.org Signed-off-by: Kent Overstreet [dpark: add more

[PATCH v5 08/11] block: kill merge_bvec_fn() completely

2015-07-06 Thread mlin
From: Kent Overstreet As generic_make_request() is now able to handle arbitrarily sized bios, it's no longer necessary for each individual block driver to define its own ->merge_bvec_fn() callback. Remove every invocation completely. Cc: Jens Axboe Cc: Lars Ellenberg Cc:

[PATCH v5 07/11] md/raid5: get rid of bio_fits_rdev()

2015-07-06 Thread mlin
From: Kent Overstreet Remove bio_fits_rdev() as sufficient merge_bvec_fn() handling is now performed by blk_queue_split() in md_make_request(). Cc: Neil Brown Cc: linux-r...@vger.kernel.org Acked-by: NeilBrown Signed-off-by: Kent Overstreet [dpark: add more description in commit message]

[PATCH v5 02/11] block: simplify bio_add_page()

2015-07-06 Thread mlin
From: Kent Overstreet Since generic_make_request() can now handle arbitrary size bios, all we have to do is make sure the bvec array doesn't overflow. __bio_add_page() doesn't need to call ->merge_bvec_fn(), where we can get rid of unnecessary code paths. Removing the call to ->merge_bvec_fn()

[PATCH v5 04/11] btrfs: remove bio splitting and merge_bvec_fn() calls

2015-07-06 Thread mlin
From: Kent Overstreet Btrfs has been doing bio splitting from btrfs_map_bio(), by checking device limits as well as calling ->merge_bvec_fn() etc. That is not necessary any more, because generic_make_request() is now able to handle arbitrarily sized bios. So clean up unnecessary code paths. Cc:

[PATCH v5 09/11] fs: use helper bio_add_page() instead of open coding on bi_io_vec

2015-07-06 Thread mlin
From: Kent Overstreet Call pre-defined helper bio_add_page() instead of open coding for iterating through bi_io_vec[]. Doing that, it's possible to make some parts in filesystems and mm/page_io.c simpler than before. Acked-by: Dave Kleikamp Cc: Christoph Hellwig Cc: Al Viro Cc:

[PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-06 Thread mlin
From: Kent Overstreet The way the block layer is currently written, it goes to great lengths 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. But this approach

[PATCH v5 06/11] md/raid5: split bio for chunk_aligned_read

2015-07-06 Thread mlin
From: Ming Lin If a read request fits entirely in a chunk, it will be passed directly to the underlying device (providing it hasn't failed of course). If it doesn't fit, the slightly less efficient path that uses the stripe_cache is used. Requests that get to the stripe cache are always

[PATCH v5 00/11] simplify block layer based on immutable biovecs

2015-07-06 Thread mlin
lso available in my git repo at: https://git.kernel.org/cgit/linux/kernel/git/mlin/linux.git/log/?h=block-generic-req git://git.kernel.org/pub/scm/linux/kernel/git/mlin/linux.git block-generic-req This patchset is a prerequisite of other consecutive patchsets, e.g. multipage biovecs, rewriti

[PATCH v5 06/11] md/raid5: split bio for chunk_aligned_read

2015-07-06 Thread mlin
From: Ming Lin min...@ssi.samsung.com If a read request fits entirely in a chunk, it will be passed directly to the underlying device (providing it hasn't failed of course). If it doesn't fit, the slightly less efficient path that uses the stripe_cache is used. Requests that get to the stripe

[PATCH v5 09/11] fs: use helper bio_add_page() instead of open coding on bi_io_vec

2015-07-06 Thread mlin
From: Kent Overstreet kent.overstr...@gmail.com Call pre-defined helper bio_add_page() instead of open coding for iterating through bi_io_vec[]. Doing that, it's possible to make some parts in filesystems and mm/page_io.c simpler than before. Acked-by: Dave Kleikamp sha...@kernel.org Cc:

[PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-06 Thread mlin
From: Kent Overstreet kent.overstr...@gmail.com The way the block layer is currently written, it goes to great lengths 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.

[PATCH v5 04/11] btrfs: remove bio splitting and merge_bvec_fn() calls

2015-07-06 Thread mlin
From: Kent Overstreet kent.overstr...@gmail.com Btrfs has been doing bio splitting from btrfs_map_bio(), by checking device limits as well as calling -merge_bvec_fn() etc. That is not necessary any more, because generic_make_request() is now able to handle arbitrarily sized bios. So clean up

[PATCH v5 07/11] md/raid5: get rid of bio_fits_rdev()

2015-07-06 Thread mlin
From: Kent Overstreet kent.overstr...@gmail.com Remove bio_fits_rdev() as sufficient merge_bvec_fn() handling is now performed by blk_queue_split() in md_make_request(). Cc: Neil Brown ne...@suse.de Cc: linux-r...@vger.kernel.org Acked-by: NeilBrown ne...@suse.de Signed-off-by: Kent Overstreet

[PATCH v5 00/11] simplify block layer based on immutable biovecs

2015-07-06 Thread mlin
for stacking block drivers (e.g. md and bcache) to handle merging bio consistently. This simplication will help every individual block driver avoid having such an issue. Patches are against 4.2-rc1. These are also available in my git repo at: https://git.kernel.org/cgit/linux/kernel/git/mlin/linux.git

[PATCH v5 02/11] block: simplify bio_add_page()

2015-07-06 Thread mlin
From: Kent Overstreet kent.overstr...@gmail.com Since generic_make_request() can now handle arbitrary size bios, all we have to do is make sure the bvec array doesn't overflow. __bio_add_page() doesn't need to call -merge_bvec_fn(), where we can get rid of unnecessary code paths. Removing the

[PATCH v5 08/11] block: kill merge_bvec_fn() completely

2015-07-06 Thread mlin
From: Kent Overstreet kent.overstr...@gmail.com As generic_make_request() is now able to handle arbitrarily sized bios, it's no longer necessary for each individual block driver to define its own -merge_bvec_fn() callback. Remove every invocation completely. Cc: Jens Axboe ax...@kernel.dk Cc:

[PATCH v5 03/11] bcache: remove driver private bio splitting code

2015-07-06 Thread mlin
From: Kent Overstreet kent.overstr...@gmail.com The bcache driver has always accepted arbitrarily large bios and split them internally. Now that every driver must accept arbitrarily large bios this code isn't nessecary anymore. Cc: linux-bca...@vger.kernel.org Signed-off-by: Kent Overstreet

[PATCH v5 05/11] block: remove split code in blkdev_issue_discard

2015-07-06 Thread mlin
From: Ming Lin min...@ssi.samsung.com The split code in blkdev_issue_discard() can go away now that any driver that cares does the split. Signed-off-by: Ming Lin min...@ssi.samsung.com --- block/blk-lib.c | 73 +++-- 1 file changed, 14

[PATCH v5 10/11] block: remove bio_get_nr_vecs()

2015-07-06 Thread mlin
From: Kent Overstreet kent.overstr...@gmail.com We can always fill up the bio now, no need to estimate the possible size based on queue parameters. Signed-off-by: Kent Overstreet kent.overstr...@gmail.com [hch: rebased and wrote a changelog] Signed-off-by: Christoph Hellwig h...@lst.de

[PATCH v5 11/11] Documentation: update notes in biovecs about arbitrarily sized bios

2015-07-06 Thread mlin
From: Dongsu Park dp...@posteo.net 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. Cc: Christoph Hellwig h...@infradead.org Cc: Kent Overstreet kent.overstr...@gmail.com