block/fs/drivers: remove rw argument from submit_bio
This has callers of submit_bio/submit_bio_wait set the bio->bi_rw instead of passing it in. This makes that use the same as generic_make_request and how we set the other bio fields. Signed-off-by: Mike Christie <mchristi@redhat.com> Fixed up fs/ext4/crypto.c Signed-off-by: Jens Axboe <axboe@fb.com>
Cette révision appartient à :

révisé par
Jens Axboe

Parent
af8c34ce6a
révision
4e49ea4a3d
@@ -530,7 +530,7 @@ static void o2hb_bio_end_io(struct bio *bio)
|
||||
static struct bio *o2hb_setup_one_bio(struct o2hb_region *reg,
|
||||
struct o2hb_bio_wait_ctxt *wc,
|
||||
unsigned int *current_slot,
|
||||
unsigned int max_slots)
|
||||
unsigned int max_slots, int rw)
|
||||
{
|
||||
int len, current_page;
|
||||
unsigned int vec_len, vec_start;
|
||||
@@ -556,6 +556,7 @@ static struct bio *o2hb_setup_one_bio(struct o2hb_region *reg,
|
||||
bio->bi_bdev = reg->hr_bdev;
|
||||
bio->bi_private = wc;
|
||||
bio->bi_end_io = o2hb_bio_end_io;
|
||||
bio->bi_rw = rw;
|
||||
|
||||
vec_start = (cs << bits) % PAGE_SIZE;
|
||||
while(cs < max_slots) {
|
||||
@@ -591,7 +592,8 @@ static int o2hb_read_slots(struct o2hb_region *reg,
|
||||
o2hb_bio_wait_init(&wc);
|
||||
|
||||
while(current_slot < max_slots) {
|
||||
bio = o2hb_setup_one_bio(reg, &wc, ¤t_slot, max_slots);
|
||||
bio = o2hb_setup_one_bio(reg, &wc, ¤t_slot, max_slots,
|
||||
READ);
|
||||
if (IS_ERR(bio)) {
|
||||
status = PTR_ERR(bio);
|
||||
mlog_errno(status);
|
||||
@@ -599,7 +601,7 @@ static int o2hb_read_slots(struct o2hb_region *reg,
|
||||
}
|
||||
|
||||
atomic_inc(&wc.wc_num_reqs);
|
||||
submit_bio(READ, bio);
|
||||
submit_bio(bio);
|
||||
}
|
||||
|
||||
status = 0;
|
||||
@@ -623,7 +625,7 @@ static int o2hb_issue_node_write(struct o2hb_region *reg,
|
||||
|
||||
slot = o2nm_this_node();
|
||||
|
||||
bio = o2hb_setup_one_bio(reg, write_wc, &slot, slot+1);
|
||||
bio = o2hb_setup_one_bio(reg, write_wc, &slot, slot+1, WRITE_SYNC);
|
||||
if (IS_ERR(bio)) {
|
||||
status = PTR_ERR(bio);
|
||||
mlog_errno(status);
|
||||
@@ -631,7 +633,7 @@ static int o2hb_issue_node_write(struct o2hb_region *reg,
|
||||
}
|
||||
|
||||
atomic_inc(&write_wc->wc_num_reqs);
|
||||
submit_bio(WRITE_SYNC, bio);
|
||||
submit_bio(bio);
|
||||
|
||||
status = 0;
|
||||
bail:
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur