Skip to content

Commit e28c02b

Browse files
AstralBobAndreas Gruenbacher
authored andcommitted
gfs2: When gfs2_dirty_inode gets a glock error, dump the glock
Before this patch, if function gfs2_dirty_inode got an error when trying to lock the inode glock, it complained, but it didn't say what glock or inode had the problem. In this case, it almost always means that dinode_in found an error with the dinode in the file system. So it makes sense to dump the glock, which tells us the location of the dinode in the file system. That will allow us to analyze the corruption from the metadata. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]>
1 parent 70499cd commit e28c02b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/gfs2/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ static void gfs2_dirty_inode(struct inode *inode, int flags)
566566
ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);
567567
if (ret) {
568568
fs_err(sdp, "dirty_inode: glock %d\n", ret);
569+
gfs2_dump_glock(NULL, ip->i_gl, true);
569570
return;
570571
}
571572
need_unlock = 1;

0 commit comments

Comments
 (0)