Skip to content

Commit 0d16dcf

Browse files
Mike Christieaxboe
authored andcommitted
ocfs2: use bio op accessors
Separate the op from the rq_flag_bits and have ocfs2 set/get the bio using bio_set_op_attrs/bio_op. Signed-off-by: Mike Christie <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent b2d4586 commit 0d16dcf

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

fs/ocfs2/cluster/heartbeat.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,8 @@ static void o2hb_bio_end_io(struct bio *bio)
530530
static struct bio *o2hb_setup_one_bio(struct o2hb_region *reg,
531531
struct o2hb_bio_wait_ctxt *wc,
532532
unsigned int *current_slot,
533-
unsigned int max_slots, int rw)
533+
unsigned int max_slots, int op,
534+
int op_flags)
534535
{
535536
int len, current_page;
536537
unsigned int vec_len, vec_start;
@@ -556,7 +557,7 @@ static struct bio *o2hb_setup_one_bio(struct o2hb_region *reg,
556557
bio->bi_bdev = reg->hr_bdev;
557558
bio->bi_private = wc;
558559
bio->bi_end_io = o2hb_bio_end_io;
559-
bio->bi_rw = rw;
560+
bio_set_op_attrs(bio, op, op_flags);
560561

561562
vec_start = (cs << bits) % PAGE_SIZE;
562563
while(cs < max_slots) {
@@ -593,7 +594,7 @@ static int o2hb_read_slots(struct o2hb_region *reg,
593594

594595
while(current_slot < max_slots) {
595596
bio = o2hb_setup_one_bio(reg, &wc, &current_slot, max_slots,
596-
READ);
597+
REQ_OP_READ, 0);
597598
if (IS_ERR(bio)) {
598599
status = PTR_ERR(bio);
599600
mlog_errno(status);
@@ -625,7 +626,8 @@ static int o2hb_issue_node_write(struct o2hb_region *reg,
625626

626627
slot = o2nm_this_node();
627628

628-
bio = o2hb_setup_one_bio(reg, write_wc, &slot, slot+1, WRITE_SYNC);
629+
bio = o2hb_setup_one_bio(reg, write_wc, &slot, slot+1, REQ_OP_WRITE,
630+
WRITE_SYNC);
629631
if (IS_ERR(bio)) {
630632
status = PTR_ERR(bio);
631633
mlog_errno(status);

0 commit comments

Comments
 (0)