On 3/8/07, Linus Torvalds [EMAIL PROTECTED] wrote:
Which is why you introduced a new system call, but that leads to all the
problems with the file descriptor no longer being *usable*.
Think scripts. It's easy to do reads in perl scripts, and parse the
output. In contrast, making perl use a new
abstracting
out the bio iterator, I think.
Kent Overstreet (26):
block: Fix a buffer overrun in bio_integrity_split()
block: Convert integrity to bvec_alloc_bs()
block: Add bio_advance()
block: Refactor blk_update_request()
md: Convert md_trim_bio() to use bio_advance()
block: Add
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
partial completed bios to be
submitted, which along with immutable biovecs enables effecient bio
splitting.
Some of the callers were (double) checking that bios could be split, so
update their checks too.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC
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
for
the new flag.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: Alasdair Kergon a...@redhat.com
CC: dm-de...@redhat.com
CC: Martin K. Petersen martin.peter...@oracle.com
---
block/blk-core.c | 2 ++
drivers/md/dm.c | 1 -
fs/bio
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
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
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
CC: NeilBrown ne...@suse.de
---
drivers/md/raid1.c | 16 +++-
fs/bio.c| 28
include/linux/bio.h
pass in a struct bio_vec (not a
pointer) which is updated with what the current biovec would be (taking
into account bi_bvec_done and bi_size).
So because of that it's more worthwhile to be consistent about
bio_for_each_segment()/bio_for_each_segment_all() usage.
Signed-off-by: Kent Overstreet
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
implementation.
This will also help document the intent of code that's using it -
bio_for_each_segment_all() is only legal to use for code that owns the
bio.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: Neil Brown ne...@suse.de
CC: Boaz Harrosh bharr
-
a later patch renames __bio_for_each_segment() -
bio_for_each_segment_all(), and documents that
bio_for_each_segment_all() is only for code that owns the bio.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
mm/bounce.c | 73
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
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
CC: Ed L. Cashin ecas...@coraid.com
CC: Nick
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 | 27 +--
1 file
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: NeilBrown ne...@suse.de
---
drivers/md/raid1.c | 24 ++--
1 file changed, 6 insertions(+), 18 deletions(-)
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 28f506a..4614b9e
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
Acked-by: Tejun Heo t...@kernel.org
---
drivers
For immutable bvecs, all bi_idx usage needs to be audited - so here
we're removing all the unnecessary uses.
Most of these are places where it was being initialized on a bio that
was just allocated, a few others are conversions to standard macros.
Signed-off-by: Kent Overstreet koverstr
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
CC: Lars Ellenberg
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
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
a different
mempool for its bvecs, and thus avoid a potential deadlock.
This is eventually for immutable bio vecs - immutable bvecs aren't
useful if we still have to copy them, hence the need for the pointer.
Less code is always nice too, though.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC
partial updates, and dumping before and after on
various bio/bvec fields when doing a partial update.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
block/blk-core.c | 80 +---
1 file changed, 12 insertions
in bio_integrity_split() that didn't make any sense.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: Martin K. Petersen martin.peter...@oracle.com
---
fs/bio-integrity.c | 3 ---
include/linux/bio.h | 6 --
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git
On Mon, Sep 24, 2012 at 07:04:50PM -0400, Jim Paris wrote:
Kent Overstreet wrote:
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
On Tue, Sep 25, 2012 at 01:54:52PM +0200, Lars Ellenberg wrote:
On Mon, Sep 24, 2012 at 03:34:46PM -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
On Tue, Sep 25, 2012 at 07:51:07AM +0200, Hannes Reinecke wrote:
On 09/25/2012 12:34 AM, Kent Overstreet wrote:
+/**
+ * submit_bio_wait - submit a bio, and wait until it completes
+ * @rw: whether to %READ or %WRITE, or maybe to %READA (read ahead)
+ * @bio: The struct bio which
On Wed, Sep 26, 2012 at 10:38:27AM +1000, NeilBrown wrote:
On Mon, 24 Sep 2012 15:34:45 -0700 Kent Overstreet koverstr...@google.com
wrote:
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: NeilBrown ne...@suse.de
---
drivers/md/md.c | 19
On Wed, Oct 03, 2012 at 03:15:26PM -0400, Jeff Moyer wrote:
Kent Overstreet koverstr...@google.com writes:
On Tue, Oct 02, 2012 at 01:41:17PM -0400, Jeff Moyer wrote:
Kent Overstreet koverstr...@google.com writes:
So, I and other people keep running into things where we really need
On Thu, Oct 04, 2012 at 06:58:06AM +0900, Tejun Heo wrote:
Hello, Kent.
On Tue, Oct 02, 2012 at 08:00:20PM -0700, Kent Overstreet wrote:
However, I don't think it's a good idea to try to implement something
which is a neutral transport of opaque data between userland and lower
layers
Nothing used the return value, and it probably wasn't possible to use it
safely for the locked versions (aio_complete(), aio_put_req()). Just
kill it.
Signed-off-by: Kent Overstreet koverstr...@google.com
---
fs/aio.c| 19 +++
include/linux/aio.h |8
2
into userspace, but I couldn't figure
out how to sanely do that... so vmap works for now.
Signed-off-by: Kent Overstreet koverstr...@google.com
---
fs/aio.c| 85 +--
include/linux/aio.h |7 +++--
2 files changed, 32 insertions(+), 60
Bunch of cleanup, and make it lockless so that userspace can safely pull
events off the ringbuffer without racing with io_getevents().
Signed-off-by: Kent Overstreet koverstr...@google.com
---
fs/aio.c | 220 +-
1 file changed, 73
goes to 1, we drop that initial refcount.
Some other semi related cleanup too.
Signed-off-by: Kent Overstreet koverstr...@google.com
---
fs/aio.c| 187 +--
include/linux/aio.h |5 +-
2 files changed, 63 insertions(+), 129 deletions
Minor refactoring, to get rid of some duplicated code
Signed-off-by: Kent Overstreet koverstr...@google.com
---
fs/aio.c | 72 ++
1 file changed, 39 insertions(+), 33 deletions(-)
diff --git a/fs/aio.c b/fs/aio.c
index 1ad2d97
On Tue, Oct 09, 2012 at 11:37:53AM -0700, Zach Brown wrote:
On Mon, Oct 08, 2012 at 11:39:20PM -0700, Kent Overstreet wrote:
Bunch of cleanup
Ugh. That's way too much noisy change for one patch with no
description. Break it up into functional pieces and actually describe
them.
Heh, I
On Tue, Oct 09, 2012 at 11:29:49AM -0700, Zach Brown wrote:
On Mon, Oct 08, 2012 at 11:39:19PM -0700, Kent Overstreet wrote:
It simplifies a lot of stuff if the ringbuffer is contiguously mapped
into kernel space, and we can delete a lot of code - in particular, this
is useful
On Tue, Oct 09, 2012 at 11:26:25AM -0700, Zach Brown wrote:
On Mon, Oct 08, 2012 at 11:39:17PM -0700, Kent Overstreet wrote:
Minor refactoring, to get rid of some duplicated code
Honestly: I wouldn't bother. Nothing of consequence uses cancel.
I have an RFC patch series that tears it out
On Tue, Oct 09, 2012 at 11:27:55AM -0700, Zach Brown wrote:
On Mon, Oct 08, 2012 at 11:39:18PM -0700, Kent Overstreet wrote:
The refcounting before wasn't very clear; there are two refcounts in
struct kioctx, with an unclear relationship between them (or between
them and ctx-dead).
Now
On Tue, Oct 09, 2012 at 03:32:10PM -0700, Zach Brown wrote:
If it is measurable I'll take another stab at using memory from
__get_free_pages() for the ringbuffer. That really would be the ideal
solution.
No, then you'll run into high order allocation failures with rings that
don't fit in
On Tue, Oct 09, 2012 at 03:47:03PM -0700, Zach Brown wrote:
If libaio is the only thing in userspace looking at the ringbuffer, and
if I'm looking at the latest libaio code this shouldn't break
anything...
We can't assume that libaio is the only thing in userspace using the
mapped buffer
On Tue, Oct 09, 2012 at 04:10:59PM -0700, Zach Brown wrote:
Well, the ringbuffer does have those compat flags and incompat flags.
Which libaio conveniently doesn't check, but for what it does it
shouldn't really matter I guess.
Well, the presumed point of the incompat flags would be to
On Tue, Oct 09, 2012 at 03:58:36PM -0700, Zach Brown wrote:
Not if we decouple the ringbuffer size from max_requests.
Hmm, interesting.
This would be useful to do anyways because right now, allocating a kiocb
has to take a global refcount and check head and tail in the ringbuffer
just
On Tue, Oct 09, 2012 at 03:35:04PM -0700, Zach Brown wrote:
Alright... send it out then.
Workin' on it! :)
Also, do you know which branch Jens has his patches in?
http://git.kernel.dk/?p=linux-block.git;a=commit;h=6b6723fc3e4f24dbd80526df935ca115ead578c6
On Tue, Oct 09, 2012 at 05:26:34PM -0700, Zach Brown wrote:
The AIO ringbuffer stuff just annoys me more than most
Not more than everyone, though, I can personally promise you that :).
(it wasn't until
the other day that I realized it was actually exported to userspace...
what led to
On Tue, Oct 09, 2012 at 05:36:26PM -0700, Zach Brown wrote:
The only situation you have to worry about is when the ringbuffer fills
up and stuff goes on the list, and then completions completely stop -
this should be a rare enough situation that maybe we could just hack
around it with a
On Wed, Oct 10, 2012 at 07:03:56AM -0400, Theodore Ts'o wrote:
On Tue, Oct 09, 2012 at 02:37:00PM -0700, Kent Overstreet wrote:
Honestly: I wouldn't bother. Nothing of consequence uses cancel.
I have an RFC patch series that tears it out. Let me polish that up
send it out, I'll cc
On Wed, Oct 10, 2012 at 02:43:15PM -0700, Zach Brown wrote:
True. But that could be solved with a separate interface that either
doesn't use a context to submit a call synchronously, or uses an
implicit per thread context.
Sure, but why bother if we can make the one submission interface
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
partial updates, and dumping before and after on
various bio/bvec fields when doing a partial update.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
block/blk-core.c | 80 +---
1 file changed, 12 insertions
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
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
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 | 27 +--
1 file
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 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
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
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
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
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
---
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
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
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
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
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
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
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
pass in a struct bio_vec (not a
pointer) which is updated with what the current biovec would be (taking
into account bi_bvec_done and bi_size).
So because of that it's more worthwhile to be consistent about
bio_for_each_segment()/bio_for_each_segment_all() usage.
Signed-off-by: Kent Overstreet
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
CC: NeilBrown ne...@suse.de
---
drivers/md/raid1.c | 16 +++-
fs/bio.c| 28
include/linux/bio.h
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
-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: Martin K. Petersen martin.peter...@oracle.com
---
fs/bio-integrity.c | 132 +++-
fs/bio.c| 36 ++
include/linux/bio.h | 8 ++--
3 files changed, 68
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
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
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
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
, 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
vecs - a later patch is
going to make more use of this pointer.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: Martin K. Petersen martin.peter...@oracle.com
---
fs/bio-integrity.c | 5 +++--
include/linux/bio.h | 4 +++-
2 files changed, 6 insertions(+), 3
-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
Acked-by: Tejun Heo t...@kernel.org
Reviewed-by: Muthukumar Ratty mut...@gmail.com
---
fs/bio.c| 116 +++-
include/linux/bio.h | 9
2 files changed, 123
for
the new flag.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: Alasdair Kergon a...@redhat.com
CC: dm-de...@redhat.com
CC: Martin K. Petersen martin.peter...@oracle.com
---
block/blk-core.c | 2 ++
drivers/md/dm.c | 1 -
fs/bio
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: 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
implementation.
This will also help document the intent of code that's using it -
bio_for_each_segment_all() is only legal to use for code that owns the
bio.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
CC: Neil Brown ne...@suse.de
CC: Boaz Harrosh bharr
For immutable bvecs, all bi_idx usage needs to be audited - so here
we're removing all the unnecessary uses.
Most of these are places where it was being initialized on a bio that
was just allocated, a few others are conversions to standard macros.
Signed-off-by: Kent Overstreet koverstr
-
a later patch renames __bio_for_each_segment() -
bio_for_each_segment_all(), and documents that
bio_for_each_segment_all() is only for code that owns the bio.
Signed-off-by: Kent Overstreet koverstr...@google.com
CC: Jens Axboe ax...@kernel.dk
---
mm/bounce.c | 73
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
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
1 - 100 of 2735 matches
Mail list logo