From: Mike Christie <mchri...@redhat.com>

This patch has ocfs2 set the bio bi_op to a REQ_OP, and
rq_flag_bits to bi_rw.

This patch is compile tested only.

Signed-off-by: Mike Christie <mchri...@redhat.com>
---
 fs/ocfs2/cluster/heartbeat.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index bbc6203..4635f89 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -531,7 +531,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;
@@ -557,7 +558,8 @@ 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->bi_op = op;
+       bio->bi_rw = op_flags;
 
        vec_start = (cs << bits) % PAGE_CACHE_SIZE;
        while(cs < max_slots) {
@@ -594,7 +596,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);
@@ -626,7 +628,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);
-- 
1.8.3.1


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to