block: Convert drivers to immutable biovecs
Now that we've got a mechanism for immutable biovecs - bi_iter.bi_bvec_done - we need to convert drivers to use primitives that respect it instead of using the bvec array directly. Signed-off-by: Kent Overstreet <kmo@daterainc.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: NeilBrown <neilb@suse.de> Cc: Alasdair Kergon <agk@redhat.com> Cc: dm-devel@redhat.com
This commit is contained in:
@@ -526,8 +526,8 @@ static void read_async_bio(struct mirror *m, struct bio *bio)
|
||||
struct dm_io_region io;
|
||||
struct dm_io_request io_req = {
|
||||
.bi_rw = READ,
|
||||
.mem.type = DM_IO_BVEC,
|
||||
.mem.ptr.bvec = bio->bi_io_vec + bio->bi_iter.bi_idx,
|
||||
.mem.type = DM_IO_BIO,
|
||||
.mem.ptr.bio = bio,
|
||||
.notify.fn = read_callback,
|
||||
.notify.context = bio,
|
||||
.client = m->ms->io_client,
|
||||
@@ -629,8 +629,8 @@ static void do_write(struct mirror_set *ms, struct bio *bio)
|
||||
struct mirror *m;
|
||||
struct dm_io_request io_req = {
|
||||
.bi_rw = WRITE | (bio->bi_rw & WRITE_FLUSH_FUA),
|
||||
.mem.type = DM_IO_BVEC,
|
||||
.mem.ptr.bvec = bio->bi_io_vec + bio->bi_iter.bi_idx,
|
||||
.mem.type = DM_IO_BIO,
|
||||
.mem.ptr.bio = bio,
|
||||
.notify.fn = write_callback,
|
||||
.notify.context = bio,
|
||||
.client = ms->io_client,
|
||||
|
Reference in New Issue
Block a user