summaryrefslogtreecommitdiffstats
path: root/fs/bio.c
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-08-07 14:24:32 -0700
committerKent Overstreet <kmo@daterainc.com>2013-11-23 22:33:49 -0800
commita4ad39b1d10584dfcfcfb0d510faab2c7f034399 (patch)
treea0747f9978fceb202975f43f15ed4489c6600894 /fs/bio.c
parent75d5d8156500cd3833d66806889372e294af514d (diff)
downloadop-kernel-dev-a4ad39b1d10584dfcfcfb0d510faab2c7f034399.zip
op-kernel-dev-a4ad39b1d10584dfcfcfb0d510faab2c7f034399.tar.gz
block: Convert bio_iovec() to bvec_iter
For immutable biovecs, we'll be introducing a new bio_iovec() that uses our new bvec iterator to construct a biovec, taking into account bvec_iter->bi_bvec_done - this patch updates existing users for the new usage. Some of the existing users really do need a pointer into the bvec array - those uses are all going to be removed, but we'll need the functionality from immutable to remove them - so for now rename the existing bio_iovec() -> __bio_iovec(), and it'll be removed in a couple patches. Signed-off-by: Kent Overstreet <kmo@daterainc.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: "Ed L. Cashin" <ecashin@coraid.com> Cc: Alasdair Kergon <agk@redhat.com> Cc: dm-devel@redhat.com Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Diffstat (limited to 'fs/bio.c')
-rw-r--r--fs/bio.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/bio.c b/fs/bio.c
index a402ad6..7bb281f 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -821,12 +821,12 @@ void bio_advance(struct bio *bio, unsigned bytes)
break;
}
- if (bytes >= bio_iovec(bio)->bv_len) {
- bytes -= bio_iovec(bio)->bv_len;
+ if (bytes >= bio_iovec(bio).bv_len) {
+ bytes -= bio_iovec(bio).bv_len;
bio->bi_iter.bi_idx++;
} else {
- bio_iovec(bio)->bv_len -= bytes;
- bio_iovec(bio)->bv_offset += bytes;
+ bio_iovec(bio).bv_len -= bytes;
+ bio_iovec(bio).bv_offset += bytes;
bytes = 0;
}
}
@@ -879,8 +879,8 @@ void bio_copy_data(struct bio *dst, struct bio *src)
unsigned src_offset, dst_offset, bytes;
void *src_p, *dst_p;
- src_bv = bio_iovec(src);
- dst_bv = bio_iovec(dst);
+ src_bv = __bio_iovec(src);
+ dst_bv = __bio_iovec(dst);
src_offset = src_bv->bv_offset;
dst_offset = dst_bv->bv_offset;
@@ -893,7 +893,7 @@ void bio_copy_data(struct bio *dst, struct bio *src)
if (!src)
break;
- src_bv = bio_iovec(src);
+ src_bv = __bio_iovec(src);
}
src_offset = src_bv->bv_offset;
@@ -906,7 +906,7 @@ void bio_copy_data(struct bio *dst, struct bio *src)
if (!dst)
break;
- dst_bv = bio_iovec(dst);
+ dst_bv = __bio_iovec(dst);
}
dst_offset = dst_bv->bv_offset;
@@ -1776,8 +1776,8 @@ struct bio_pair *bio_split(struct bio *bi, int first_sectors)
bp->bio1.bi_iter.bi_size = first_sectors << 9;
if (bi->bi_vcnt != 0) {
- bp->bv1 = *bio_iovec(bi);
- bp->bv2 = *bio_iovec(bi);
+ bp->bv1 = bio_iovec(bi);
+ bp->bv2 = bio_iovec(bi);
if (bio_is_rw(bi)) {
bp->bv2.bv_offset += first_sectors << 9;
OpenPOWER on IntegriCloud