--- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -439,8 +439,13 @@ static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf) /* i_diskflags and i_eattr must be set before gfs2_set_inode_flags() */ gfs2_set_inode_flags(inode); height = be16_to_cpu(str->di_height); - if (unlikely(height > GFS2_MAX_META_HEIGHT)) - goto corrupt; + if (unlikely(height >= GFS2_MAX_META_HEIGHT)) { + printk(KERN_INFO "buf->di_height: %d\n", height); + depth = be16_to_cpu(str->di_depth); + printk(KERN_INFO "buf->di_depth: %d\n", depth); + printk(KERN_INFO "inode->i_size: %d\n", inode->i_size); + height = GFS2_MAX_META_HEIGHT - 1; + } ip->i_height = (u8)height; depth = be16_to_cpu(str->di_depth); --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -895,8 +895,12 @@ static int __gfs2_iomap_get(struct inode *inode, loff_t pos, loff_t length, iomap->length = len << inode->i_blkbits; height = ip->i_height; - while ((lblock + 1) * sdp->sd_sb.sb_bsize > sdp->sd_heightsize[height]) + while (height < GFS2_MAX_META_HEIGHT + 10 && + (lblock + 1) * sdp->sd_sb.sb_bsize > sdp->sd_heightsize[height]) { + printk("lblock:%d, height:%d, sb_bsize: %d, heightsize:%d,pos:%d,size:%d\n", + lblock, height, sdp->sd_sb.sb_bsize, sdp->sd_heightsize[height], pos, size); height++; + } find_metapath(sdp, lblock, mp, height); if (height > ip->i_height || gfs2_is_stuffed(ip)) goto do_alloc; --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c @@ -736,12 +736,15 @@ static void buf_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr) { struct list_head *head; struct gfs2_bufdata *bd; + int i = 0; if (tr == NULL) return; head = &tr->tr_buf; while (!list_empty(head)) { + i++; + printk("buf_lo_after_commit: %d\n", i); bd = list_first_entry(head, struct gfs2_bufdata, bd_list); list_del_init(&bd->bd_list); gfs2_unpin(sdp, bd->bd_bh, tr); --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -1362,6 +1362,7 @@ int gfs2_quota_init(struct gfs2_sbd *sdp) u64 dblock; u32 extlen = 0; int error; + u32 qcid = 0; if (gfs2_check_internal_file_size(sdp->sd_qc_inode, 1, 64 << 20)) return -EIO; @@ -1376,6 +1377,7 @@ int gfs2_quota_init(struct gfs2_sbd *sdp) __GFP_ZERO); if (!sdp->sd_quota_bitmap) return error; + qcid = ip->i_inode.i_ino; for (x = 0; x < blocks; x++) { struct buffer_head *bh; @@ -1442,7 +1444,7 @@ int gfs2_quota_init(struct gfs2_sbd *sdp) } if (found) - fs_info(sdp, "found %u quota changes\n", found); + fs_info(sdp, "found %u quota changes, i_ino:%d\n", found, qcid); return 0; @@ -1471,6 +1473,7 @@ void gfs2_quota_cleanup(struct gfs2_sbd *sdp) hlist_bl_del_rcu(&qd->qd_hlist); spin_unlock_bucket(qd->qd_hash); + fs_info(sdp, "qc_id:%d\n", cpu_to_be32(from_kqid(&init_user_ns, qd->qd_id))); gfs2_assert_warn(sdp, !qd->qd_change); gfs2_assert_warn(sdp, !qd->qd_slot_count); gfs2_assert_warn(sdp, !qd->qd_bh_count);