]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
ocfs2: use bio op accessors
authorMike Christie <mchristi@redhat.com>
Sun, 5 Jun 2016 19:32:01 +0000 (14:32 -0500)
committerJens Axboe <axboe@fb.com>
Tue, 7 Jun 2016 19:41:38 +0000 (13:41 -0600)
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 <mchristi@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
fs/ocfs2/cluster/heartbeat.c

index 8b1d86ebd8d1f955d8517ad495f1785492a767c2..636abcbd46501b9c00ef5e3155d6656a161d7d49 100644 (file)
@@ -530,7 +530,8 @@ 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, int rw)
+                                     unsigned int max_slots, int op,
+                                     int op_flags)
 {
        int len, current_page;
        unsigned int vec_len, vec_start;
@@ -556,7 +557,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;
+       bio_set_op_attrs(bio, op, op_flags);
 
        vec_start = (cs << bits) % PAGE_SIZE;
        while(cs < max_slots) {
@@ -593,7 +594,7 @@ static int o2hb_read_slots(struct o2hb_region *reg,
 
        while(current_slot < max_slots) {
                bio = o2hb_setup_one_bio(reg, &wc, &current_slot, max_slots,
-                                        READ);
+                                        REQ_OP_READ, 0);
                if (IS_ERR(bio)) {
                        status = PTR_ERR(bio);
                        mlog_errno(status);
@@ -625,7 +626,8 @@ 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, WRITE_SYNC);
+       bio = o2hb_setup_one_bio(reg, write_wc, &slot, slot+1, REQ_OP_WRITE,
+                                WRITE_SYNC);
        if (IS_ERR(bio)) {
                status = PTR_ERR(bio);
                mlog_errno(status);