[GFS2] Style changes in logging code
As per Jan Engelhardt's comments, removed some unused code and removed some brackets which were not required. Cc: Jan Engelhardt <jengelh@linux01.gwdg.de> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:
parent
cca195c5c0
commit
a67cdbd457
@ -177,7 +177,6 @@ int gfs2_log_reserve(struct gfs2_sbd *sdp, unsigned int blks)
|
|||||||
gfs2_log_lock(sdp);
|
gfs2_log_lock(sdp);
|
||||||
}
|
}
|
||||||
sdp->sd_log_blks_free -= blks;
|
sdp->sd_log_blks_free -= blks;
|
||||||
/* printk(KERN_INFO "reserved %u blocks (%u left)\n", blks, sdp->sd_log_blks_free); */
|
|
||||||
gfs2_log_unlock(sdp);
|
gfs2_log_unlock(sdp);
|
||||||
mutex_unlock(&sdp->sd_log_reserve_mutex);
|
mutex_unlock(&sdp->sd_log_reserve_mutex);
|
||||||
|
|
||||||
@ -198,7 +197,6 @@ void gfs2_log_release(struct gfs2_sbd *sdp, unsigned int blks)
|
|||||||
|
|
||||||
gfs2_log_lock(sdp);
|
gfs2_log_lock(sdp);
|
||||||
sdp->sd_log_blks_free += blks;
|
sdp->sd_log_blks_free += blks;
|
||||||
/* printk(KERN_INFO "released %u blocks (%u left)\n", blks, sdp->sd_log_blks_free); */
|
|
||||||
gfs2_assert_withdraw(sdp,
|
gfs2_assert_withdraw(sdp,
|
||||||
sdp->sd_log_blks_free <= sdp->sd_jdesc->jd_blocks);
|
sdp->sd_log_blks_free <= sdp->sd_jdesc->jd_blocks);
|
||||||
gfs2_log_unlock(sdp);
|
gfs2_log_unlock(sdp);
|
||||||
@ -213,9 +211,8 @@ static u64 log_bmap(struct gfs2_sbd *sdp, unsigned int lbn)
|
|||||||
int bdy;
|
int bdy;
|
||||||
|
|
||||||
error = gfs2_block_map(sdp->sd_jdesc->jd_inode, lbn, &new, &dbn, &bdy);
|
error = gfs2_block_map(sdp->sd_jdesc->jd_inode, lbn, &new, &dbn, &bdy);
|
||||||
if (!(!error && dbn)) {
|
if (error || !dbn)
|
||||||
printk(KERN_INFO "error=%d, dbn=%llu lbn=%u", error, (unsigned long long)dbn, lbn);
|
printk(KERN_INFO "error=%d, dbn=%llu lbn=%u", error, (unsigned long long)dbn, lbn);
|
||||||
}
|
|
||||||
gfs2_assert_withdraw(sdp, !error && dbn);
|
gfs2_assert_withdraw(sdp, !error && dbn);
|
||||||
|
|
||||||
return dbn;
|
return dbn;
|
||||||
@ -414,13 +411,6 @@ static void log_flush_commit(struct gfs2_sbd *sdp)
|
|||||||
struct list_head *head = &sdp->sd_log_flush_list;
|
struct list_head *head = &sdp->sd_log_flush_list;
|
||||||
struct gfs2_log_buf *lb;
|
struct gfs2_log_buf *lb;
|
||||||
struct buffer_head *bh;
|
struct buffer_head *bh;
|
||||||
#if 0
|
|
||||||
unsigned int d;
|
|
||||||
|
|
||||||
d = log_distance(sdp, sdp->sd_log_flush_head, sdp->sd_log_head);
|
|
||||||
|
|
||||||
gfs2_assert_withdraw(sdp, d + 1 == sdp->sd_log_blks_reserved);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
while (!list_empty(head)) {
|
while (!list_empty(head)) {
|
||||||
lb = list_entry(head->next, struct gfs2_log_buf, lb_list);
|
lb = list_entry(head->next, struct gfs2_log_buf, lb_list);
|
||||||
|
@ -518,7 +518,7 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp)
|
|||||||
unsigned int num, n;
|
unsigned int num, n;
|
||||||
__be64 *ptr = NULL;
|
__be64 *ptr = NULL;
|
||||||
|
|
||||||
offset += (2*sizeof(__be64) - 1);
|
offset += 2*sizeof(__be64) - 1;
|
||||||
offset &= ~(2*sizeof(__be64) - 1);
|
offset &= ~(2*sizeof(__be64) - 1);
|
||||||
limit = (sdp->sd_sb.sb_bsize - offset)/sizeof(__be64);
|
limit = (sdp->sd_sb.sb_bsize - offset)/sizeof(__be64);
|
||||||
|
|
||||||
|
@ -306,8 +306,8 @@ static int foreach_descriptor(struct gfs2_jdesc *jd, unsigned int start,
|
|||||||
u32 length;
|
u32 length;
|
||||||
__be64 *ptr;
|
__be64 *ptr;
|
||||||
unsigned int offset = sizeof(struct gfs2_log_descriptor);
|
unsigned int offset = sizeof(struct gfs2_log_descriptor);
|
||||||
offset += (sizeof(__be64)-1);
|
offset += sizeof(__be64) - 1;
|
||||||
offset &= ~(sizeof(__be64)-1);
|
offset &= ~(sizeof(__be64) - 1);
|
||||||
|
|
||||||
while (start != end) {
|
while (start != end) {
|
||||||
error = gfs2_replay_read_block(jd, start, &bh);
|
error = gfs2_replay_read_block(jd, start, &bh);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user