diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-02-27 12:00:42 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-02-27 12:00:42 -0500 |
commit | 568f4c9659a2225b0d29cf86feecbcf25c9045c8 (patch) | |
tree | 8ec0fee12313f88a195e0b90924f6b7633ba29f1 /fs/gfs2/log.c | |
parent | 3a8fe9be6c9794e55ac2253eab91d42b28a9dab6 (diff) |
[GFS2] 80 Column audit of GFS2
Requested by:
Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/log.c')
-rw-r--r-- | fs/gfs2/log.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 2483f0c2c50e..0e31d46edd4d 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c | |||
@@ -74,10 +74,12 @@ unsigned int gfs2_struct2blk(struct gfs2_sbd *sdp, unsigned int nstruct, | |||
74 | unsigned int first, second; | 74 | unsigned int first, second; |
75 | 75 | ||
76 | blks = 1; | 76 | blks = 1; |
77 | first = (sdp->sd_sb.sb_bsize - sizeof(struct gfs2_log_descriptor)) / ssize; | 77 | first = (sdp->sd_sb.sb_bsize - sizeof(struct gfs2_log_descriptor)) / |
78 | ssize; | ||
78 | 79 | ||
79 | if (nstruct > first) { | 80 | if (nstruct > first) { |
80 | second = (sdp->sd_sb.sb_bsize - sizeof(struct gfs2_meta_header)) / ssize; | 81 | second = (sdp->sd_sb.sb_bsize - |
82 | sizeof(struct gfs2_meta_header)) / ssize; | ||
81 | blks += DIV_RU(nstruct - first, second); | 83 | blks += DIV_RU(nstruct - first, second); |
82 | } | 84 | } |
83 | 85 | ||
@@ -255,7 +257,8 @@ static uint64_t log_bmap(struct gfs2_sbd *sdp, unsigned int lbn) | |||
255 | uint64_t dbn; | 257 | uint64_t dbn; |
256 | int error; | 258 | int error; |
257 | 259 | ||
258 | error = gfs2_block_map(get_v2ip(sdp->sd_jdesc->jd_inode), lbn, &new, &dbn, NULL); | 260 | error = gfs2_block_map(get_v2ip(sdp->sd_jdesc->jd_inode), |
261 | lbn, &new, &dbn, NULL); | ||
259 | gfs2_assert_withdraw(sdp, !error && dbn); | 262 | gfs2_assert_withdraw(sdp, !error && dbn); |
260 | 263 | ||
261 | return dbn; | 264 | return dbn; |
@@ -554,7 +557,8 @@ static void log_refund(struct gfs2_sbd *sdp, struct gfs2_trans *tr) | |||
554 | gfs2_assert_withdraw(sdp, ((int)sdp->sd_log_commited_revoke) >= 0); | 557 | gfs2_assert_withdraw(sdp, ((int)sdp->sd_log_commited_revoke) >= 0); |
555 | 558 | ||
556 | if (sdp->sd_log_commited_buf) | 559 | if (sdp->sd_log_commited_buf) |
557 | reserved += 1 + sdp->sd_log_commited_buf + sdp->sd_log_commited_buf/503; | 560 | reserved += 1 + sdp->sd_log_commited_buf + |
561 | sdp->sd_log_commited_buf/503; | ||
558 | if (sdp->sd_log_commited_revoke) | 562 | if (sdp->sd_log_commited_revoke) |
559 | reserved += gfs2_struct2blk(sdp, sdp->sd_log_commited_revoke, | 563 | reserved += gfs2_struct2blk(sdp, sdp->sd_log_commited_revoke, |
560 | sizeof(uint64_t)); | 564 | sizeof(uint64_t)); |