File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -546,17 +546,14 @@ static inline unsigned int log_distance(struct gfs2_sbd *sdp, unsigned int newer
546546static unsigned int calc_reserved (struct gfs2_sbd * sdp )
547547{
548548 unsigned int reserved = 0 ;
549- unsigned int mbuf ;
550- unsigned int dbuf ;
549+ unsigned int blocks ;
551550 struct gfs2_trans * tr = sdp -> sd_log_tr ;
552551
553552 if (tr ) {
554- mbuf = tr -> tr_num_buf_new - tr -> tr_num_buf_rm ;
555- dbuf = tr -> tr_num_databuf_new - tr -> tr_num_databuf_rm ;
556- reserved = mbuf + dbuf ;
557- /* Account for header blocks */
558- reserved += DIV_ROUND_UP (mbuf , buf_limit (sdp ));
559- reserved += DIV_ROUND_UP (dbuf , databuf_limit (sdp ));
553+ blocks = tr -> tr_num_buf_new - tr -> tr_num_buf_rm ;
554+ reserved += blocks + DIV_ROUND_UP (blocks , buf_limit (sdp ));
555+ blocks = tr -> tr_num_databuf_new - tr -> tr_num_databuf_rm ;
556+ reserved += blocks + DIV_ROUND_UP (blocks , databuf_limit (sdp ));
560557 }
561558
562559 if (sdp -> sd_log_committed_revoke > 0 )
You can’t perform that action at this time.
0 commit comments