diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2009-04-07 09:13:01 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2009-05-11 07:36:41 -0400 |
commit | c969f58ca43fc403c75f5d3da4cf1e21de7afaa0 (patch) | |
tree | d38b579882f89c222937530c527224e2a77548b0 /fs/gfs2/lops.c | |
parent | a4d7749be5de4a7261bcbe3c7d96c748792ec455 (diff) |
GFS2: Update the rw flags
After Jens recent updates:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a1f242524c3c1f5d40f1c9c343427e34d1aadd6e
et al. this is a patch to bring gfs2 uptodate with the core
code. Also I've managed to squash another call to ll_rw_block()
along the way.
There is still one part of the GFS2 I/O paths which are not correctly
annotated and that is due to the sharing of the writeback code between
the data and metadata address spaces. I would like to change that too,
but this patch is still worth doing on its own, I think.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/lops.c')
-rw-r--r-- | fs/gfs2/lops.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 80e4f5f898bb..00315f50fa46 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" |
@@ -189,7 +191,7 @@ static void buf_lo_before_commit(struct gfs2_sbd *sdp) | |||
189 | } | 191 | } |
190 | 192 | ||
191 | gfs2_log_unlock(sdp); | 193 | gfs2_log_unlock(sdp); |
192 | submit_bh(WRITE, bh); | 194 | submit_bh(WRITE_SYNC_PLUG, bh); |
193 | gfs2_log_lock(sdp); | 195 | gfs2_log_lock(sdp); |
194 | 196 | ||
195 | n = 0; | 197 | n = 0; |
@@ -199,7 +201,7 @@ static void buf_lo_before_commit(struct gfs2_sbd *sdp) | |||
199 | gfs2_log_unlock(sdp); | 201 | gfs2_log_unlock(sdp); |
200 | lock_buffer(bd2->bd_bh); | 202 | lock_buffer(bd2->bd_bh); |
201 | bh = gfs2_log_fake_buf(sdp, bd2->bd_bh); | 203 | bh = gfs2_log_fake_buf(sdp, bd2->bd_bh); |
202 | submit_bh(WRITE, bh); | 204 | submit_bh(WRITE_SYNC_PLUG, bh); |
203 | gfs2_log_lock(sdp); | 205 | gfs2_log_lock(sdp); |
204 | if (++n >= num) | 206 | if (++n >= num) |
205 | break; | 207 | break; |
@@ -341,7 +343,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp) | |||
341 | sdp->sd_log_num_revoke--; | 343 | sdp->sd_log_num_revoke--; |
342 | 344 | ||
343 | if (offset + sizeof(u64) > sdp->sd_sb.sb_bsize) { | 345 | if (offset + sizeof(u64) > sdp->sd_sb.sb_bsize) { |
344 | submit_bh(WRITE, bh); | 346 | submit_bh(WRITE_SYNC_PLUG, bh); |
345 | 347 | ||
346 | bh = gfs2_log_get_buf(sdp); | 348 | bh = gfs2_log_get_buf(sdp); |
347 | mh = (struct gfs2_meta_header *)bh->b_data; | 349 | mh = (struct gfs2_meta_header *)bh->b_data; |
@@ -358,7 +360,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp) | |||
358 | } | 360 | } |
359 | gfs2_assert_withdraw(sdp, !sdp->sd_log_num_revoke); | 361 | gfs2_assert_withdraw(sdp, !sdp->sd_log_num_revoke); |
360 | 362 | ||
361 | submit_bh(WRITE, bh); | 363 | submit_bh(WRITE_SYNC_PLUG, bh); |
362 | } | 364 | } |
363 | 365 | ||
364 | static void revoke_lo_before_scan(struct gfs2_jdesc *jd, | 366 | static void revoke_lo_before_scan(struct gfs2_jdesc *jd, |
@@ -560,7 +562,7 @@ static void gfs2_write_blocks(struct gfs2_sbd *sdp, struct buffer_head *bh, | |||
560 | ptr = bh_log_ptr(bh); | 562 | ptr = bh_log_ptr(bh); |
561 | 563 | ||
562 | get_bh(bh); | 564 | get_bh(bh); |
563 | submit_bh(WRITE, bh); | 565 | submit_bh(WRITE_SYNC_PLUG, bh); |
564 | gfs2_log_lock(sdp); | 566 | gfs2_log_lock(sdp); |
565 | while(!list_empty(list)) { | 567 | while(!list_empty(list)) { |
566 | bd = list_entry(list->next, struct gfs2_bufdata, bd_le.le_list); | 568 | bd = list_entry(list->next, struct gfs2_bufdata, bd_le.le_list); |
@@ -586,7 +588,7 @@ static void gfs2_write_blocks(struct gfs2_sbd *sdp, struct buffer_head *bh, | |||
586 | } else { | 588 | } else { |
587 | bh1 = gfs2_log_fake_buf(sdp, bd->bd_bh); | 589 | bh1 = gfs2_log_fake_buf(sdp, bd->bd_bh); |
588 | } | 590 | } |
589 | submit_bh(WRITE, bh1); | 591 | submit_bh(WRITE_SYNC_PLUG, bh1); |
590 | gfs2_log_lock(sdp); | 592 | gfs2_log_lock(sdp); |
591 | ptr += 2; | 593 | ptr += 2; |
592 | } | 594 | } |