gfs2_log_lock(sdp);
}
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);
mutex_unlock(&sdp->sd_log_reserve_mutex);
gfs2_log_lock(sdp);
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,
sdp->sd_log_blks_free <= sdp->sd_jdesc->jd_blocks);
gfs2_log_unlock(sdp);
int 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);
- }
gfs2_assert_withdraw(sdp, !error && dbn);
return dbn;
struct list_head *head = &sdp->sd_log_flush_list;
struct gfs2_log_buf *lb;
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)) {
lb = list_entry(head->next, struct gfs2_log_buf, lb_list);
unsigned int num, n;
__be64 *ptr = NULL;
- offset += (2*sizeof(__be64) - 1);
+ offset += 2*sizeof(__be64) - 1;
offset &= ~(2*sizeof(__be64) - 1);
limit = (sdp->sd_sb.sb_bsize - offset)/sizeof(__be64);
u32 length;
__be64 *ptr;
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) {
error = gfs2_replay_read_block(jd, start, &bh);