diff options
Diffstat (limited to 'fs/gfs2/lops.c')
-rw-r--r-- | fs/gfs2/lops.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 80e4f5f898bb..9969ff062c5b 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c | |||
@@ -13,6 +13,8 @@ | |||
13 | #include <linux/completion.h> | 13 | #include <linux/completion.h> |
14 | #include <linux/buffer_head.h> | 14 | #include <linux/buffer_head.h> |
15 | #include <linux/gfs2_ondisk.h> | 15 | #include <linux/gfs2_ondisk.h> |
16 | #include <linux/bio.h> | ||
17 | #include <linux/fs.h> | ||
16 | 18 | ||
17 | #include "gfs2.h" | 19 | #include "gfs2.h" |
18 | #include "incore.h" | 20 | #include "incore.h" |
@@ -25,6 +27,7 @@ | |||
25 | #include "rgrp.h" | 27 | #include "rgrp.h" |
26 | #include "trans.h" | 28 | #include "trans.h" |
27 | #include "util.h" | 29 | #include "util.h" |
30 | #include "trace_gfs2.h" | ||
28 | 31 | ||
29 | /** | 32 | /** |
30 | * gfs2_pin - Pin a buffer in memory | 33 | * gfs2_pin - Pin a buffer in memory |
@@ -51,6 +54,7 @@ static void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh) | |||
51 | if (bd->bd_ail) | 54 | if (bd->bd_ail) |
52 | list_move(&bd->bd_ail_st_list, &bd->bd_ail->ai_ail2_list); | 55 | list_move(&bd->bd_ail_st_list, &bd->bd_ail->ai_ail2_list); |
53 | get_bh(bh); | 56 | get_bh(bh); |
57 | trace_gfs2_pin(bd, 1); | ||
54 | } | 58 | } |
55 | 59 | ||
56 | /** | 60 | /** |
@@ -87,6 +91,7 @@ static void gfs2_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh, | |||
87 | bd->bd_ail = ai; | 91 | bd->bd_ail = ai; |
88 | list_add(&bd->bd_ail_st_list, &ai->ai_ail1_list); | 92 | list_add(&bd->bd_ail_st_list, &ai->ai_ail1_list); |
89 | clear_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags); | 93 | clear_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags); |
94 | trace_gfs2_pin(bd, 0); | ||
90 | gfs2_log_unlock(sdp); | 95 | gfs2_log_unlock(sdp); |
91 | unlock_buffer(bh); | 96 | unlock_buffer(bh); |
92 | } | 97 | } |
@@ -189,7 +194,7 @@ static void buf_lo_before_commit(struct gfs2_sbd *sdp) | |||
189 | } | 194 | } |
190 | 195 | ||
191 | gfs2_log_unlock(sdp); | 196 | gfs2_log_unlock(sdp); |
192 | submit_bh(WRITE, bh); | 197 | submit_bh(WRITE_SYNC_PLUG, bh); |
193 | gfs2_log_lock(sdp); | 198 | gfs2_log_lock(sdp); |
194 | 199 | ||
195 | n = 0; | 200 | n = 0; |
@@ -199,7 +204,7 @@ static void buf_lo_before_commit(struct gfs2_sbd *sdp) | |||
199 | gfs2_log_unlock(sdp); | 204 | gfs2_log_unlock(sdp); |
200 | lock_buffer(bd2->bd_bh); | 205 | lock_buffer(bd2->bd_bh); |
201 | bh = gfs2_log_fake_buf(sdp, bd2->bd_bh); | 206 | bh = gfs2_log_fake_buf(sdp, bd2->bd_bh); |
202 | submit_bh(WRITE, bh); | 207 | submit_bh(WRITE_SYNC_PLUG, bh); |
203 | gfs2_log_lock(sdp); | 208 | gfs2_log_lock(sdp); |
204 | if (++n >= num) | 209 | if (++n >= num) |
205 | break; | 210 | break; |
@@ -341,7 +346,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp) | |||
341 | sdp->sd_log_num_revoke--; | 346 | sdp->sd_log_num_revoke--; |
342 | 347 | ||
343 | if (offset + sizeof(u64) > sdp->sd_sb.sb_bsize) { | 348 | if (offset + sizeof(u64) > sdp->sd_sb.sb_bsize) { |
344 | submit_bh(WRITE, bh); | 349 | submit_bh(WRITE_SYNC_PLUG, bh); |
345 | 350 | ||
346 | bh = gfs2_log_get_buf(sdp); | 351 | bh = gfs2_log_get_buf(sdp); |
347 | mh = (struct gfs2_meta_header *)bh->b_data; | 352 | mh = (struct gfs2_meta_header *)bh->b_data; |
@@ -358,7 +363,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp) | |||
358 | } | 363 | } |
359 | gfs2_assert_withdraw(sdp, !sdp->sd_log_num_revoke); | 364 | gfs2_assert_withdraw(sdp, !sdp->sd_log_num_revoke); |
360 | 365 | ||
361 | submit_bh(WRITE, bh); | 366 | submit_bh(WRITE_SYNC_PLUG, bh); |
362 | } | 367 | } |
363 | 368 | ||
364 | static void revoke_lo_before_scan(struct gfs2_jdesc *jd, | 369 | static void revoke_lo_before_scan(struct gfs2_jdesc *jd, |
@@ -560,7 +565,7 @@ static void gfs2_write_blocks(struct gfs2_sbd *sdp, struct buffer_head *bh, | |||
560 | ptr = bh_log_ptr(bh); | 565 | ptr = bh_log_ptr(bh); |
561 | 566 | ||
562 | get_bh(bh); | 567 | get_bh(bh); |
563 | submit_bh(WRITE, bh); | 568 | submit_bh(WRITE_SYNC_PLUG, bh); |
564 | gfs2_log_lock(sdp); | 569 | gfs2_log_lock(sdp); |
565 | while(!list_empty(list)) { | 570 | while(!list_empty(list)) { |
566 | bd = list_entry(list->next, struct gfs2_bufdata, bd_le.le_list); | 571 | bd = list_entry(list->next, struct gfs2_bufdata, bd_le.le_list); |
@@ -586,7 +591,7 @@ static void gfs2_write_blocks(struct gfs2_sbd *sdp, struct buffer_head *bh, | |||
586 | } else { | 591 | } else { |
587 | bh1 = gfs2_log_fake_buf(sdp, bd->bd_bh); | 592 | bh1 = gfs2_log_fake_buf(sdp, bd->bd_bh); |
588 | } | 593 | } |
589 | submit_bh(WRITE, bh1); | 594 | submit_bh(WRITE_SYNC_PLUG, bh1); |
590 | gfs2_log_lock(sdp); | 595 | gfs2_log_lock(sdp); |
591 | ptr += 2; | 596 | ptr += 2; |
592 | } | 597 | } |