(), bio_alloc_bioset(), and bio_kmalloc().
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
v7: Re-add dropped comments, improv patch description
---
fs/bio.c| 110 ++--
include/linux/bio.h | 16
,
but due to the way io_pool is used and overloaded this looks not quite
trivial so I'm leaving it for a later patch.
v6: Fix comment on struct dm_rq_clone_bio_info, per Tejun
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Alasdair Kergon a...@redhat.com
Acked-by: Tejun Heo t...@kernel.org
of
the functionality the last patch adedd.
This will also help in a later patch changing how bio cloning works.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: NeilBrown ne...@suse.de
CC: Alasdair Kergon a...@redhat.com
CC: Boaz Harrosh bharr...@panasas.com
CC
(), bio_alloc_bioset(), and bio_kmalloc().
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
v7: Re-add dropped comments, improv patch description
---
fs/bio.c| 110 ++--
include/linux/bio.h | 16
of
the functionality the last patch adedd.
This will also help in a later patch changing how bio cloning works.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: NeilBrown ne...@suse.de
CC: Alasdair Kergon a...@redhat.com
CC: Boaz Harrosh bharr...@panasas.com
CC
those a
bit - move some code from bio_put() to bio_free() and kill the redundant
bio-bi_next = NULL.
v5: Switch to BIO_KMALLOC_POOL ((void *)~0), per Boaz
v6: BIO_KMALLOC_POOL now NULL, drop bio_free's EXPORT_SYMBOL
v7: No #define BIO_KMALLOC_POOL anymore
Signed-off-by: Kent Overstreet koverstr
place,
refactor it a bit and pull out __bio_free() for bio_reset() to use.
v5: Switch to BIO_KMALLOC_POOL ((void *)~0), per Boaz
v6: BIO_KMALLOC_POOL now NULL, drop bio_free's EXPORT_SYMBOL
v7: No #define BIO_KMALLOC_POOL anymore
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe
Now that bios keep track of where they were allocated from,
bio_integrity_alloc_bioset() becomes redundant.
Remove bio_integrity_alloc_bioset() and drop bio_set argument from the
related functions and make them use bio-bi_pool.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe
v9: Add a function comment
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
Acked-by: Tejun Heo t...@kernel.org
---
fs/bio.c | 24
1 file changed, 24 insertions(+)
diff --git a/fs/bio.c b/fs/bio.c
index 208141f..74ab3f0 100644
--- a/fs
This is prep work for killing bi_destructor - previously, pktcdvd had
its own pkt_bio_alloc which was basically duplication bio_kmalloc(),
necessitating its own bi_destructor implementation.
v5: Un-reorder some functions, to make the patch easier to review
Signed-off-by: Kent Overstreet koverstr
() and resetting bi_destructor.
v5: Add a define BIO_RESET_BITS, to be very explicit about what parts of
bio-bi_flags are saved.
v6: Further commenting verbosity, per Tejun
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
Acked-by: Tejun Heo t...@kernel.org
---
fs
destructors
unnecessary, so they're then deleted.
v6: Explain the temporary if statement in bio_put
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: NeilBrown ne...@suse.de
CC: Alasdair Kergon a...@redhat.com
CC: Nicholas Bellinger n...@linux-iscsi.org
CC: Lars
On Thu, Sep 06, 2012 at 12:21:15PM +0900, Jun'ichi Nomura wrote:
On 09/06/12 05:27, Kent Overstreet wrote:
@@ -2718,7 +2705,8 @@ struct dm_md_mempools *dm_alloc_md_mempools(unsigned
type, unsigned integrity)
if (!pools-tio_pool)
goto free_io_pool_and_out;
- pools
,
but due to the way io_pool is used and overloaded this looks not quite
trivial so I'm leaving it for a later patch.
v6: Fix comment on struct dm_rq_clone_bio_info, per Tejun
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Alasdair Kergon a...@redhat.com
Acked-by: Tejun Heo t...@kernel.org
v9: Add a function comment
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
Acked-by: Tejun Heo t...@kernel.org
---
fs/bio.c | 24
include/linux/bio.h | 1 +
include/linux/blk_types.h | 25
of
the functionality the last patch adedd.
This will also help in a later patch changing how bio cloning works.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: NeilBrown ne...@suse.de
CC: Alasdair Kergon a...@redhat.com
CC: Boaz Harrosh bharr...@panasas.com
CC
(), bio_alloc_bioset(), and bio_kmalloc().
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
v7: Re-add dropped comments, improv patch description
---
fs/bio.c| 110 ++--
include/linux/bio.h | 16
those a
bit - move some code from bio_put() to bio_free() and kill the redundant
bio-bi_next = NULL.
v5: Switch to BIO_KMALLOC_POOL ((void *)~0), per Boaz
v6: BIO_KMALLOC_POOL now NULL, drop bio_free's EXPORT_SYMBOL
v7: No #define BIO_KMALLOC_POOL anymore
Signed-off-by: Kent Overstreet koverstr
Screwed up the bio_reset() patch in the last patch series when I went to edit
the description, fixed that here.
Only other change is the dm patch - made the front_pad conditional on
DM_TYPE_BIO_BASED.
Kent Overstreet (8):
block: Generalized bio pool freeing
block: Ues bi_pool
This is prep work for killing bi_destructor - previously, pktcdvd had
its own pkt_bio_alloc which was basically duplication bio_kmalloc(),
necessitating its own bi_destructor implementation.
v5: Un-reorder some functions, to make the patch easier to review
Signed-off-by: Kent Overstreet koverstr
Now that bios keep track of where they were allocated from,
bio_integrity_alloc_bioset() becomes redundant.
Remove bio_integrity_alloc_bioset() and drop bio_set argument from the
related functions and make them use bio-bi_pool.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe
destructors
unnecessary, so they're then deleted.
v6: Explain the temporary if statement in bio_put
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: NeilBrown ne...@suse.de
CC: Alasdair Kergon a...@redhat.com
CC: Nicholas Bellinger n...@linux-iscsi.org
CC: Lars
On Fri, Sep 07, 2012 at 09:10:25AM +0930, Rusty Russell wrote:
Kent Overstreet koverstr...@google.com writes:
On Thu, Sep 06, 2012 at 12:49:56PM +0300, Michael S. Tsirkin wrote:
On Thu, Sep 06, 2012 at 02:25:12AM -0700, Kent Overstreet wrote:
Do you not understand the difference between
,
but due to the way io_pool is used and overloaded this looks not quite
trivial so I'm leaving it for a later patch.
v6: Fix comment on struct dm_rq_clone_bio_info, per Tejun
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Alasdair Kergon a...@redhat.com
Acked-by: Tejun Heo t...@kernel.org
On Thu, Sep 06, 2012 at 07:37:10PM -0600, Jens Axboe wrote:
On 2012-09-06 17:48, Tejun Heo wrote:
Hello, guys.
(cc'ing Jens, Alasdair and Neil)
On Thu, Sep 06, 2012 at 03:34:54PM -0700, Kent Overstreet wrote:
Screwed up the bio_reset() patch in the last patch series when I went
This is prep work for killing bi_destructor - previously, pktcdvd had
its own pkt_bio_alloc which was basically duplication bio_kmalloc(),
necessitating its own bi_destructor implementation.
v5: Un-reorder some functions, to make the patch easier to review
Signed-off-by: Kent Overstreet koverstr
On Thu, Sep 06, 2012 at 07:34:18PM -0600, Jens Axboe wrote:
On 2012-09-06 16:34, Kent Overstreet wrote:
Reusing bios is something that's been highly frowned upon in the past,
but driver code keeps doing it anyways. If it's going to happen anyways,
we should provide a generic method
These patches were part of the block cleanups series I just sent out, but I
split them off. Nothing's changed with them lately, the last thing I added was
a bit of logic to the punt to rescue code to only punt bios that were
allocated from the current bio_set.
Kent Overstreet (2):
block
to be submitted.
Tested it by forcing the rescue codepath to be taken (by disabling the
first GFP_NOWAIT) attempt, and then ran it with bcache (which does a lot
of arbitrary bio splitting) and verified that the rescuer was being
invoked.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax
This is prep work for the next patch, which embeds a struct bio_list in
struct bio_set.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
include/linux/bio.h | 66 ++---
1 file changed, 33 insertions(+), 33
On Fri, Sep 07, 2012 at 04:06:45PM -0600, Jens Axboe wrote:
On 2012-09-07 15:55, Jens Axboe wrote:
On 2012-09-07 14:58, Kent Overstreet wrote:
On Thu, Sep 06, 2012 at 07:34:18PM -0600, Jens Axboe wrote:
On 2012-09-06 16:34, Kent Overstreet wrote:
Reusing bios is something that's been
, bi_idx and
bi_bvec_done may both be nonzero. Again, just need to use generic accessors.
Kent Overstreet (9):
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
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: NeilBrown ne...@suse.de
---
drivers/md/md.c | 19 +--
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 7a2b079..51ce48c 100644
More prep work for immutable bvecs/effecient bio splitting - usage of
bi_vcnt has to be auditing, so getting rid of all the unnecessary usage
makes that easier.
Plus, bio_segments() is really what this code wanted, as it respects the
current value of bi_idx.
Signed-off-by: Kent Overstreet
These were harmless but uneccessary,andt getting rid of them makes the
code easier to audit since most of them need to be removed.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
drivers/block/floppy.c | 1 -
drivers/md/dm-verity.c | 2 +-
drivers/md
Prep work for immutable bio_vecs/efficient bio splitting: they require
auditing and removing most uses of bi_idx.
So here we convert bio_split() to respect the current value of bi_idx
and use the bio_iovec() macro, instead of assuming bi_idx will be 0.
Signed-off-by: Kent Overstreet koverstr
Bunch of places in the code weren't using it where they could be -
this'll reduce the size of the patch that puts bi_sector/bi_size/bi_idx
into a struct bvec_iter.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
drivers/block/aoe/aoeblk.c | 2
Just a little convenience macro - main reason to add it now is preparing
for immutable bio vecs, it'll reduce the size of the patch that puts
bi_sector/bi_size/bi_idx into a struct bvec_iter.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
block/blk
Converts it to use bio_advance(), simplifying it quite a bit in the
process.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
block/blk-core.c | 84 +++-
1 file changed, 16 insertions(+), 68 deletions
This is prep work for immutable bio vecs; we first want to centralize
where bvecs are modified.
Next two patches convert some existing code to use this function.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
fs/bio.c| 41
for the
pointer. Less code is always nice too, though.
Also fix an amusing bug in bio_integrity_split() - struct bio_pair
doesn't have the integrity bvecs after the bio_integrity_payloads, so
there was a buffer overrun. The code was confusing pointers with arrays.
Signed-off-by: Kent Overstreet koverstr
On Sat, Sep 08, 2012 at 12:14:33AM +0100, Alasdair G Kergon wrote:
As I indicated already in this discussion, dm started to use
merge_bvec_fn as a cheap way of avoiding splitting and this improved
overall efficiency. Often it's better to pay the small price of calling
that function to ensure
On Sat, Sep 08, 2012 at 12:36:41PM -0700, Tejun Heo wrote:
(Restoring cc list from the previous discussion. Please retain the cc
list of the people who discussed in the previous postings.)
On Fri, Sep 07, 2012 at 03:12:53PM -0700, Kent Overstreet wrote:
But this is tricky and not a generic
On Sat, Sep 08, 2012 at 12:41:15PM -0700, Tejun Heo wrote:
Hello, Kent.
On Fri, Sep 07, 2012 at 03:59:11PM -0700, Kent Overstreet wrote:
Random assortment of refactoring and trivial cleanups.
Immutable bio vecs and efficient bio splitting require auditing and removing
pretty much all
On Mon, Sep 10, 2012 at 10:22:10AM -0700, Tejun Heo wrote:
Hello, Kent.
On Sun, Sep 09, 2012 at 05:28:10PM -0700, Kent Overstreet wrote:
+ while ((bio = bio_list_pop(current-bio_list)))
+ bio_list_add(bio-bi_pool == bs ? punt : nopunt, bio
On Mon, Sep 10, 2012 at 01:40:10PM -0700, Tejun Heo wrote:
Hello, Kent.
On Mon, Sep 10, 2012 at 01:24:35PM -0700, Kent Overstreet wrote:
And at that point, why duplicate that line of code? It doesn't matter that
much, but IMO a goto retry better labels what's actually going on (it's
On Mon, Sep 10, 2012 at 02:37:10PM -0700, Tejun Heo wrote:
On Mon, Sep 10, 2012 at 02:33:49PM -0700, Kent Overstreet wrote:
Simpler isn't really an objective thing though. To me the goto version
is more obvious/idiomatic.
Eh. I'll do it your way, but consider this a formal objection :p
On Mon, Sep 10, 2012 at 11:50:57PM +0100, Alasdair G Kergon wrote:
On Mon, Sep 10, 2012 at 03:09:10PM -0700, Tejun Heo wrote:
On Mon, Sep 10, 2012 at 02:56:33PM -0700, Kent Overstreet wrote:
commit df7e63cbffa3065fcc4ba2b9a93418d7c7312243
Author: Kent Overstreet koverstr...@google.com
On Mon, Sep 10, 2012 at 04:01:01PM -0700, Tejun Heo wrote:
Hello,
On Mon, Sep 10, 2012 at 3:50 PM, Alasdair G Kergon a...@redhat.com wrote:
Note that this doesn't do anything for allocation from other
mempools.
Note that dm has several cases of this, so this patch should not be
On Mon, Sep 10, 2012 at 04:06:54PM -0700, Tejun Heo wrote:
Hello, again.
cc'ing Kent and Vivek. The original thread is at
http://thread.gmane.org/gmane.linux.network.drbd.devel/2130
On Mon, Sep 10, 2012 at 03:54:42PM -0700, Tejun Heo wrote:
We can possibly work around that by
cc'ing Neil
On Mon, Sep 10, 2012 at 04:06:54PM -0700, Tejun Heo wrote:
Hello, again.
cc'ing Kent and Vivek. The original thread is at
http://thread.gmane.org/gmane.linux.network.drbd.devel/2130
On Mon, Sep 10, 2012 at 03:54:42PM -0700, Tejun Heo wrote:
We can possibly work around
, 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
Converts it to use bio_advance(), simplifying it quite a bit in the
process.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
block/blk-core.c | 84 +++-
1 file changed, 16 insertions(+), 68 deletions
Prep work for immutable bio_vecs/efficient bio splitting: they require
auditing and removing most uses of bi_idx.
So here we convert bio_split() to respect the current value of bi_idx
and use the bio_iovec() macro, instead of assuming bi_idx will be 0.
Signed-off-by: Kent Overstreet koverstr
Bunch of places in the code weren't using it where they could be -
this'll reduce the size of the patch that puts bi_sector/bi_size/bi_idx
into a struct bvec_iter.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
drivers/block/aoe/aoeblk.c | 2
This gets open coded quite a bit and it's tricky to get right, so make a
generic version and convert some existing users over to it instead.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
fs/bio.c| 70
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: Jiri Kosina jkos...@suse.cz
---
drivers/block/pktcdvd.c | 79 -
1 file changed, 12 insertions(+), 67 deletions(-)
diff --git a/drivers/block/pktcdvd.c b
for
the new flag.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
block/blk-core.c | 2 ++
drivers/md/dm.c | 1 -
fs/bio-integrity.c| 1 -
fs/bio.c | 8 +---
include/linux/blk_types.h | 2 +-
5 files changed, 8
This was the only real user of BIO_CLONED, which didn't have very clear
semantics. Convert to its own flag so we can get rid of BIO_CLONED.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: Martin K. Petersen martin.peter...@oracle.com
---
fs/bio
This is for the new bio splitting code. When we split a bio, if the
split occured on a bvec boundry we reuse the bvec for the new bio. But
that means bio_free() can't free it, hence the explicit flag.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
Acked
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: NeilBrown ne...@suse.de
---
drivers/md/raid1.c | 16 +++-
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index d30b4cb..18b743a 100644
More utility code to replace stuff that's getting open coded.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
fs/bio.c| 28
include/linux/bio.h | 1 +
2 files changed, 29 insertions(+)
diff --git a/fs/bio.c b/fs
.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
drivers/md/raid1.c | 2 +-
fs/bio.c| 12 ++--
fs/exofs/ore.c | 2 +-
fs/exofs/ore_raid.c | 2 +-
include/linux/bio.h | 16 +---
mm/bounce.c | 2 +-
6 files
A few places in the code were either open coding or using the wrong
version - fix.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: NeilBrown ne...@suse.de
---
drivers/md/dm-crypt.c | 3 +--
drivers/md/raid1.c| 10 +++---
fs/bio.c
the bounce code doesn't own that bio the __ version wasn't
correct.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
mm/bounce.c | 73 -
1 file changed, 19 insertions(+), 54 deletions(-)
diff
This doesn't really delete any code _yet_, but once immutable bvecs are
done we can just delete the rest of the code in that loop.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: NeilBrown ne...@suse.de
---
drivers/md/raid1.c | 5 ++---
1 file changed, 2
In the short term this'll help with code auditing, and if this code ever
gets used now it's converted :)
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jiri Kosina jkos...@suse.cz
---
drivers/block/pktcdvd.c | 17 -
1 file changed, 8 insertions(+), 9 deletions(-)
diff
More bi_idx removal. This code was just open coding bio_clone(). This
could probably be further improved by using bio_advance() instead of
skipping over null pages, but that'd be a larger rework.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: NeilBrown ne
Had to shuffle the code around a bit (where bi_rw and bi_end_io were
set), but shouldn't really be anything tricky here
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: NeilBrown ne...@suse.de
---
drivers/md/raid5.c | 28 ++--
1
I couldn't figure out what sbio-bi_end_io in process_checks() was
supposed to be, so I took the easy way out.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: NeilBrown ne...@suse.de
---
drivers/md/raid1.c | 22 +-
1 file changed, 5
More prep work for immutable bio vecs, mainly getting rid of references
to bi_idx.
bio_reset was being open coded in a few places. The one in sync_request
was a bit nontrivial to convert, so could use some extra eyeballs.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax
Random cleanup - this code was duplicated and it's not really specific
to md.
Also added the ability to return the actual error code.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: NeilBrown ne...@suse.de
---
drivers/md/raid1.c | 19
More prep work for immutable bvecs/effecient bio splitting - usage of
bi_vcnt has to be auditing, so getting rid of all the unnecessary usage
makes that easier.
Plus, bio_segments() is really what this code wanted, as it respects the
current value of bi_idx.
Signed-off-by: Kent Overstreet
These were harmless but uneccessary,andt getting rid of them makes the
code easier to audit since most of them need to be removed.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
drivers/block/floppy.c | 1 -
drivers/md/dm-verity.c | 2 +-
drivers/md
Just a little convenience macro - main reason to add it now is preparing
for immutable bio vecs, it'll reduce the size of the patch that puts
bi_sector/bi_size/bi_idx into a struct bvec_iter.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
block/blk
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: NeilBrown ne...@suse.de
---
drivers/md/md.c | 19 +--
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 7a2b079..51ce48c 100644
This is prep work for immutable bio vecs; we first want to centralize
where bvecs are modified.
Next two patches convert some existing code to use this function.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
fs/bio.c| 41
for the
pointer. Less code is always nice too, though.
Also fix an amusing bug in bio_integrity_split() - struct bio_pair
doesn't have the integrity bvecs after the bio_integrity_payloads, so
there was a buffer overrun. The code was confusing pointers with arrays.
Signed-off-by: Kent Overstreet koverstr
On Fri, Sep 14, 2012 at 10:50:59PM +0100, Alasdair G Kergon wrote:
On Thu, Sep 06, 2012 at 03:35:02PM -0700, Kent Overstreet wrote:
Previously, there was bio_clone() but it only allocated from the fs bio
set; as a result various users were open coding it and using
__bio_clone().
Explain
On Fri, Sep 14, 2012 at 07:28:28PM +0100, Alasdair G Kergon wrote:
On Thu, Sep 06, 2012 at 03:34:55PM -0700, Kent Overstreet wrote:
With the old code, when you allocate a bio from a bio pool you have to
implement your own destructor that knows how to find the bio pool the
bio was originally
On Wed, Sep 12, 2012 at 03:39:18PM -0400, Martin K. Petersen wrote:
Kent == Kent Overstreet koverstr...@google.com writes:
Kent,
Kent To fix the bug first, I'd have to reorder struct bio_pair and then
Kent just delete two lines of code from bio_integrity_split(). But the
Kent reordering
On Wed, Sep 12, 2012 at 03:41:36PM -0400, Martin K. Petersen wrote:
Kent == Kent Overstreet koverstr...@google.com writes:
Kent This was the only real user of BIO_CLONED, which didn't have very
Kent clear semantics. Convert to its own flag so we can get rid of
Kent BIO_CLONED.
I already
On Thu, Sep 20, 2012 at 02:58:27PM -0700, Tejun Heo wrote:
On Mon, Sep 10, 2012 at 05:22:13PM -0700, Kent Overstreet wrote:
+/**
+ * bio_advance - increment/complete a bio by some number of bytes
+ * @bio: bio to advance
+ * @bytes: number of bytes to complete
+ *
+ * This updates
On Thu, Sep 20, 2012 at 04:20:00PM -0700, Tejun Heo wrote:
Hello,
On Mon, Sep 10, 2012 at 05:22:14PM -0700, Kent Overstreet wrote:
static void req_bio_endio(struct request *rq, struct bio *bio,
unsigned int nbytes, int error)
{
+ /*
+* XXX: bio_endio
On Thu, Sep 20, 2012 at 04:25:06PM -0700, Tejun Heo wrote:
Hello,
On Thu, Sep 20, 2012 at 04:13:08PM -0700, Kent Overstreet wrote:
I just cut and pasted that from blk_update_request(), which is what the
next patch refactors...
Yeah, well, that was written when we didn't have WARNs
On Thu, Sep 20, 2012 at 04:32:25PM -0700, Tejun Heo wrote:
On Mon, Sep 10, 2012 at 05:22:16PM -0700, Kent Overstreet wrote:
Just a little convenience macro - main reason to add it now is preparing
for immutable bio vecs, it'll reduce the size of the patch that puts
bi_sector/bi_size/bi_idx
On Thu, Sep 20, 2012 at 04:36:18PM -0700, Tejun Heo wrote:
On Mon, Sep 10, 2012 at 05:22:17PM -0700, Kent Overstreet wrote:
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index 321de7b..6e4420a 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
On Thu, Sep 20, 2012 at 04:41:33PM -0700, Tejun Heo wrote:
Hey,
On Thu, Sep 20, 2012 at 04:36:32PM -0700, Kent Overstreet wrote:
Other than that, I definitely like this. It would be nice to note
that the custom partial bio advancing in blk_update_request() is
replaced with multiple
On Thu, Sep 20, 2012 at 04:45:44PM -0700, Tejun Heo wrote:
On Mon, Sep 10, 2012 at 05:22:18PM -0700, Kent Overstreet wrote:
Prep work for immutable bio_vecs/efficient bio splitting: they require
auditing and removing most uses of bi_idx.
So here we convert bio_split() to respect
On Thu, Sep 20, 2012 at 04:49:53PM -0700, Tejun Heo wrote:
On Mon, Sep 10, 2012 at 05:22:19PM -0700, Kent Overstreet wrote:
These were harmless but uneccessary,andt getting rid of them makes the
code easier to audit since most of them need to be removed.
I find the descriptions a bit too
On Thu, Sep 20, 2012 at 05:06:32PM -0700, Tejun Heo wrote:
Hello,
On Mon, Sep 10, 2012 at 05:22:26PM -0700, Kent Overstreet wrote:
+void bio_copy_data(struct bio *dst, struct bio *src)
+{
...
+ src_p = kmap_atomic(src_bv-bv_page);
+ dst_p = kmap_atomic(dst_bv
On Thu, Sep 20, 2012 at 04:56:43PM -0700, Tejun Heo wrote:
On Mon, Sep 10, 2012 at 05:22:21PM -0700, Kent Overstreet wrote:
Random cleanup - this code was duplicated and it's not really specific
to md.
Also added the ability to return the actual error code.
Signed-off-by: Kent
On Thu, Sep 20, 2012 at 05:09:47PM -0700, Tejun Heo wrote:
On Thu, Sep 20, 2012 at 05:06:32PM -0700, Tejun Heo wrote:
Hello,
On Mon, Sep 10, 2012 at 05:22:26PM -0700, Kent Overstreet wrote:
+void bio_copy_data(struct bio *dst, struct bio *src)
+{
...
+ src_p
On Thu, Sep 20, 2012 at 05:25:55PM -0700, Tejun Heo wrote:
Hello, Kent.
On Mon, Sep 10, 2012 at 05:22:30PM -0700, Kent Overstreet wrote:
A bunch of what __blk_queue_bounce() was doing was problematic for the
immutable bvec work; this cleans that up and the code is quite a bit
smaller
On Thu, Sep 20, 2012 at 05:27:06PM -0700, Tejun Heo wrote:
On Mon, Sep 10, 2012 at 05:22:30PM -0700, Kent Overstreet wrote:
A bunch of what __blk_queue_bounce() was doing was problematic for the
immutable bvec work; this cleans that up and the code is quite a bit
smaller, too
On Thu, Sep 20, 2012 at 05:38:32PM -0700, Tejun Heo wrote:
On Mon, Sep 10, 2012 at 05:22:32PM -0700, Kent Overstreet wrote:
A few places in the code were either open coding or using the wrong
version - fix.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax
On Thu, Sep 20, 2012 at 05:47:11PM -0700, Tejun Heo wrote:
On Mon, Sep 10, 2012 at 05:22:33PM -0700, Kent Overstreet wrote:
+ bio_for_each_segment_all(bv, bio, i) {
+ bv-bv_page = alloc_page(gfp_mask);
+ if (!bv-bv_page) {
+ while (bv-- != bio
On Thu, Sep 20, 2012 at 05:48:27PM -0700, Tejun Heo wrote:
On Mon, Sep 10, 2012 at 05:22:34PM -0700, Kent Overstreet wrote:
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: NeilBrown ne...@suse.de
I think it's better to merge this and the previous
On Tue, Sep 11, 2012 at 02:59:13PM +1000, NeilBrown wrote:
On Mon, 10 Sep 2012 17:22:23 -0700 Kent Overstreet koverstr...@google.com
wrote:
I couldn't figure out what sbio-bi_end_io in process_checks() was
supposed to be, so I took the easy way out.
Almost.
You save 'sbio-bi_end_io
On Tue, Sep 11, 2012 at 03:03:26PM +1000, NeilBrown wrote:
On Mon, 10 Sep 2012 17:22:24 -0700 Kent Overstreet koverstr...@google.com
wrote:
Had to shuffle the code around a bit (where bi_rw and bi_end_io were
set), but shouldn't really be anything tricky here
Signed-off-by: Kent
301 - 400 of 2734 matches
Mail list logo