Skip to contentSkip to conversation

GFS2: Copy gfs2_trans_add_bh into new data/meta functions

Cluster-devel Steven Whitehouse 1 participant 1 message Dec 17, 2012 GFS2 file system

lore
Share & tools
lore
#0 lore raw

From eea05378c24bfb30bd2e07d48d96a1e6265bd1a2 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <[email protected]>
Date: Fri, 14 Dec 2012 12:52:14 +0000
Subject: GFS2: Copy gfs2_trans_add_bh into new data/meta functions

This patch copies the body of gfs2_trans_add_bh into the two newly added gfs2_trans_add_data and gfs2_trans_add_meta functions. We can then move the .lo_add functions from lops.c into trans.c and call them directly.

As a result of this, we no longer need to use the .lo_add functions at all, so that is removed from the log operations structure.

fs/gfs2/incore.h +0 -1
index c373a24..5d129ab 100644
@@ -52,7 +52,6 @@ struct gfs2_log_header_host {
  */
 
 struct gfs2_log_operations {
-	void (*lo_add) (struct gfs2_sbd *sdp, struct gfs2_bufdata *bd);
 	void (*lo_before_commit) (struct gfs2_sbd *sdp);
 	void (*lo_after_commit) (struct gfs2_sbd *sdp, struct gfs2_ail *ai);
 	void (*lo_before_scan) (struct gfs2_jdesc *jd,
fs/gfs2/lops.c +1 -67

98 lines not on this page · raw message

fs/gfs2/lops.h +1 -6
index 954a330..d85b376 100644
@@ -29,6 +29,7 @@ extern const struct gfs2_log_operations gfs2_databuf_lops;
 extern const struct gfs2_log_operations *gfs2_log_ops[];
 extern void gfs2_log_write_page(struct gfs2_sbd *sdp, struct page *page);
 extern void gfs2_log_flush_bio(struct gfs2_sbd *sdp, int rw);
+extern void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh);
 
 static inline unsigned int buf_limit(struct gfs2_sbd *sdp)
 {
@@ -53,12 +54,6 @@ static inline void lops_init_le(struct gfs2_bufdata *bd,
 	bd->bd_ops = lops;
 }
 
-static inline void lops_add(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)
-{
-	if (bd->bd_ops->lo_add)
-		bd->bd_ops->lo_add(sdp, bd);
-}
-
 static inline void lops_before_commit(struct gfs2_sbd *sdp)
 {
 	int x;
fs/gfs2/trans.c +82 -10

127 lines not on this page · raw message

Signature · 1 line
1.7.4