diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2014-02-21 16:55:33 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2014-02-24 14:49:12 -0500 |
commit | 022ef4feed0c648aeb72d0c8ad06d266de08f525 (patch) | |
tree | 03fd8c0fe847338bcf2772a469c9eaa1853d8a9d /fs/gfs2/trans.c | |
parent | d69a3c6561362a53d1be908ca343d899161d602c (diff) |
GFS2: Move log buffer accounting to transaction
Now we have a master transaction into which other transactions
are merged, the accounting can be done using this master
transaction. We no longer require the superblock fields which
were being used for this function.
In addition, this allows for a clean up in calc_reserved()
making it rather easier understand. Also, by reducing the
number of variables used to track the buffers being added
and removed from the journal, a number of error checks are
now no longer required.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/trans.c')
-rw-r--r-- | fs/gfs2/trans.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index e0464a22908c..295f400f35ab 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c | |||
@@ -213,7 +213,6 @@ void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh) | |||
213 | set_bit(GLF_DIRTY, &bd->bd_gl->gl_flags); | 213 | set_bit(GLF_DIRTY, &bd->bd_gl->gl_flags); |
214 | gfs2_pin(sdp, bd->bd_bh); | 214 | gfs2_pin(sdp, bd->bd_bh); |
215 | tr->tr_num_databuf_new++; | 215 | tr->tr_num_databuf_new++; |
216 | sdp->sd_log_num_databuf++; | ||
217 | list_add_tail(&bd->bd_list, &tr->tr_databuf); | 216 | list_add_tail(&bd->bd_list, &tr->tr_databuf); |
218 | } | 217 | } |
219 | gfs2_log_unlock(sdp); | 218 | gfs2_log_unlock(sdp); |
@@ -241,7 +240,6 @@ static void meta_lo_add(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd) | |||
241 | gfs2_pin(sdp, bd->bd_bh); | 240 | gfs2_pin(sdp, bd->bd_bh); |
242 | mh->__pad0 = cpu_to_be64(0); | 241 | mh->__pad0 = cpu_to_be64(0); |
243 | mh->mh_jid = cpu_to_be32(sdp->sd_jdesc->jd_jid); | 242 | mh->mh_jid = cpu_to_be32(sdp->sd_jdesc->jd_jid); |
244 | sdp->sd_log_num_buf++; | ||
245 | list_add(&bd->bd_list, &tr->tr_buf); | 243 | list_add(&bd->bd_list, &tr->tr_buf); |
246 | tr->tr_num_buf_new++; | 244 | tr->tr_num_buf_new++; |
247 | } | 245 | } |