--- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1332,10 +1332,18 @@ int gfs2_glock_holder_ready(struct gfs2_holder *gh) int gfs2_glock_wait(struct gfs2_holder *gh) { unsigned long start_time = jiffies; + struct gfs2_sbd *sdp = gh->gh_gl->gl_name.ln_sbd; + printk("glock before, i_gl->g_object: 0x%p, %s\n", + gh->i_gl->g_object, __func__); might_sleep(); wait_on_bit(&gh->gh_iflags, HIF_WAIT, TASK_UNINTERRUPTIBLE); gfs2_glock_update_hold_time(gh->gh_gl, start_time); + printk("glock after, i_gl->g_object: 0x%p, %s\n", + gh->i_gl->g_object, __func__); + + if (sdp->sd_quota_inode == gh->gh_gl->gl_object) + return gh->gh_error; return gfs2_glock_holder_ready(gh); } --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -448,8 +448,11 @@ 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 > sdp->sd_max_height)) + if (unlikely(height > sdp->sd_max_height)) { + printk("err str, str->di_height: %d, i_ino: %d, i_gl->g_object: 0x%p, %s\n", + height, ip->i_inode.i_ino, ip->i_gl->g_object, __func__); goto corrupt; + } ip->i_height = (u8)height; depth = be16_to_cpu(str->di_depth); --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -913,6 +913,8 @@ static int do_sync(unsigned int num_qd, struct gfs2_quota_data **qda) goto out_dq; } + printk("quota_inode, i_ino: %d, i_gl->g_object: 0x%p, %s\n", + ip->i_inode.i_ino, ip->i_gl->g_object, __func__); error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &i_gh); if (error) goto out_dq; @@ -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, i_height: %d\n", found, ip->i_inode.i_ino, ip->i_height); return 0;