diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2012-04-02 10:34:36 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2012-04-24 11:44:24 -0400 |
commit | fdb76a4228303491b1b9b8923310f2cbcec8dc9f (patch) | |
tree | 5b08c14e65adcd54dc440955b7a6e579e426a5cc /fs/gfs2 | |
parent | af3a3ab2966112c0d0a44df7eeb1e95fe32d4495 (diff) |
GFS2: Drop "pull" argument from log_write_header()
The "pull" argument to log_write_header() is only used
for debug purposes and it is not really needed any more. There
are other tests for this particular problem, so I think we can
dispose of it in order to simplify the code.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/log.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 4752eadc7f6e..d886a17f671a 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c | |||
@@ -32,8 +32,6 @@ | |||
32 | #include "dir.h" | 32 | #include "dir.h" |
33 | #include "trace_gfs2.h" | 33 | #include "trace_gfs2.h" |
34 | 34 | ||
35 | #define PULL 1 | ||
36 | |||
37 | /** | 35 | /** |
38 | * gfs2_struct2blk - compute stuff | 36 | * gfs2_struct2blk - compute stuff |
39 | * @sdp: the filesystem | 37 | * @sdp: the filesystem |
@@ -580,7 +578,7 @@ static void gfs2_ordered_wait(struct gfs2_sbd *sdp) | |||
580 | * Returns: the initialized log buffer descriptor | 578 | * Returns: the initialized log buffer descriptor |
581 | */ | 579 | */ |
582 | 580 | ||
583 | static void log_write_header(struct gfs2_sbd *sdp, u32 flags, int pull) | 581 | static void log_write_header(struct gfs2_sbd *sdp, u32 flags) |
584 | { | 582 | { |
585 | u64 blkno = gfs2_log_bmap(sdp, sdp->sd_log_flush_head); | 583 | u64 blkno = gfs2_log_bmap(sdp, sdp->sd_log_flush_head); |
586 | struct buffer_head *bh; | 584 | struct buffer_head *bh; |
@@ -628,8 +626,6 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags, int pull) | |||
628 | 626 | ||
629 | if (sdp->sd_log_tail != tail) | 627 | if (sdp->sd_log_tail != tail) |
630 | log_pull_tail(sdp, tail); | 628 | log_pull_tail(sdp, tail); |
631 | else | ||
632 | gfs2_assert_withdraw(sdp, !pull); | ||
633 | 629 | ||
634 | sdp->sd_log_idle = (tail == sdp->sd_log_flush_head); | 630 | sdp->sd_log_idle = (tail == sdp->sd_log_flush_head); |
635 | gfs2_log_incr_head(sdp); | 631 | gfs2_log_incr_head(sdp); |
@@ -680,13 +676,13 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl) | |||
680 | lops_before_commit(sdp); | 676 | lops_before_commit(sdp); |
681 | 677 | ||
682 | if (sdp->sd_log_head != sdp->sd_log_flush_head) { | 678 | if (sdp->sd_log_head != sdp->sd_log_flush_head) { |
683 | log_write_header(sdp, 0, 0); | 679 | log_write_header(sdp, 0); |
684 | } else if (sdp->sd_log_tail != current_tail(sdp) && !sdp->sd_log_idle){ | 680 | } else if (sdp->sd_log_tail != current_tail(sdp) && !sdp->sd_log_idle){ |
685 | gfs2_log_lock(sdp); | 681 | gfs2_log_lock(sdp); |
686 | atomic_dec(&sdp->sd_log_blks_free); /* Adjust for unreserved buffer */ | 682 | atomic_dec(&sdp->sd_log_blks_free); /* Adjust for unreserved buffer */ |
687 | trace_gfs2_log_blocks(sdp, -1); | 683 | trace_gfs2_log_blocks(sdp, -1); |
688 | gfs2_log_unlock(sdp); | 684 | gfs2_log_unlock(sdp); |
689 | log_write_header(sdp, 0, PULL); | 685 | log_write_header(sdp, 0); |
690 | } | 686 | } |
691 | lops_after_commit(sdp, ai); | 687 | lops_after_commit(sdp, ai); |
692 | 688 | ||
@@ -798,8 +794,7 @@ void gfs2_log_shutdown(struct gfs2_sbd *sdp) | |||
798 | sdp->sd_log_flush_head = sdp->sd_log_head; | 794 | sdp->sd_log_flush_head = sdp->sd_log_head; |
799 | sdp->sd_log_flush_wrapped = 0; | 795 | sdp->sd_log_flush_wrapped = 0; |
800 | 796 | ||
801 | log_write_header(sdp, GFS2_LOG_HEAD_UNMOUNT, | 797 | log_write_header(sdp, GFS2_LOG_HEAD_UNMOUNT); |
802 | (sdp->sd_log_tail == current_tail(sdp)) ? 0 : PULL); | ||
803 | 798 | ||
804 | gfs2_assert_warn(sdp, atomic_read(&sdp->sd_log_blks_free) == sdp->sd_jdesc->jd_blocks); | 799 | gfs2_assert_warn(sdp, atomic_read(&sdp->sd_log_blks_free) == sdp->sd_jdesc->jd_blocks); |
805 | gfs2_assert_warn(sdp, sdp->sd_log_head == sdp->sd_log_tail); | 800 | gfs2_assert_warn(sdp, sdp->sd_log_head == sdp->sd_log_tail); |