aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/log.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2007-11-08 09:25:12 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2008-01-25 03:07:52 -0500
commit2bcd610d2fdea608a8fdac32788fc35a32a2327c (patch)
tree5b3753ff18c1da54bb860dbd67211e6abea78ca7 /fs/gfs2/log.h
parent8cbc4342478311c2a85260a7ca54d96cb7f71f7b (diff)
[GFS2] Don't add glocks to the journal
The only reason for adding glocks to the journal was to keep track of which locks required a log flush prior to release. We add a flag to the glock to allow this check to be made in a simpler way. This reduces the size of a glock (by 12 bytes on i386, 24 on x86_64) and means that we can avoid extra work during the journal flush. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/log.h')
-rw-r--r--fs/gfs2/log.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h
index 24e7161486e2..4babd430b722 100644
--- a/fs/gfs2/log.h
+++ b/fs/gfs2/log.h
@@ -57,7 +57,14 @@ void gfs2_log_incr_head(struct gfs2_sbd *sdp);
57struct buffer_head *gfs2_log_get_buf(struct gfs2_sbd *sdp); 57struct buffer_head *gfs2_log_get_buf(struct gfs2_sbd *sdp);
58struct buffer_head *gfs2_log_fake_buf(struct gfs2_sbd *sdp, 58struct buffer_head *gfs2_log_fake_buf(struct gfs2_sbd *sdp,
59 struct buffer_head *real); 59 struct buffer_head *real);
60void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl); 60void __gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl);
61
62static inline void gfs2_log_flush(struct gfs2_sbd *sbd, struct gfs2_glock *gl)
63{
64 if (!gl || test_bit(GLF_LFLUSH, &gl->gl_flags))
65 __gfs2_log_flush(sbd, gl);
66}
67
61void gfs2_log_commit(struct gfs2_sbd *sdp, struct gfs2_trans *trans); 68void gfs2_log_commit(struct gfs2_sbd *sdp, struct gfs2_trans *trans);
62void gfs2_remove_from_ail(struct gfs2_bufdata *bd); 69void gfs2_remove_from_ail(struct gfs2_bufdata *bd);
63 70