提交 7975e465 编写于 作者: D Darrick J. Wong

xfs: drop IDONTCACHE on inodes when we mark them sick

When we decide to mark an inode sick, clear the DONTCACHE flag so that
the incore inode will be kept around until memory pressure forces it out
of memory.  This increases the chances that the sick status will be
caught by someone compiling a health report later on.
Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
Reviewed-by: NDave Chinner <dchinner@redhat.com>
Reviewed-by: NCarlos Maiolino <cmaiolino@redhat.com>
上级 255794c7
...@@ -229,6 +229,15 @@ xfs_inode_mark_sick( ...@@ -229,6 +229,15 @@ xfs_inode_mark_sick(
ip->i_sick |= mask; ip->i_sick |= mask;
ip->i_checked |= mask; ip->i_checked |= mask;
spin_unlock(&ip->i_flags_lock); spin_unlock(&ip->i_flags_lock);
/*
* Keep this inode around so we don't lose the sickness report. Scrub
* grabs inodes with DONTCACHE assuming that most inode are ok, which
* is not the case here.
*/
spin_lock(&VFS_I(ip)->i_lock);
VFS_I(ip)->i_state &= ~I_DONTCACHE;
spin_unlock(&VFS_I(ip)->i_lock);
} }
/* Mark parts of an inode healed. */ /* Mark parts of an inode healed. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册