summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_icache.c
diff options
context:
space:
mode:
authorDarrick J. Wong2019-04-12 16:40:25 +0200
committerDarrick J. Wong2019-04-15 03:15:57 +0200
commit6772c1f11206f270af56d62bc26737864a63608a (patch)
treed75689f19c91e54fb2de867cbaaa89beccc46f63 /fs/xfs/xfs_icache.c
parentxfs,fstrim: fix to return correct minlen (diff)
downloadkernel-qcow2-linux-6772c1f11206f270af56d62bc26737864a63608a.tar.gz
kernel-qcow2-linux-6772c1f11206f270af56d62bc26737864a63608a.tar.xz
kernel-qcow2-linux-6772c1f11206f270af56d62bc26737864a63608a.zip
xfs: track metadata health status
Add the necessary in-core metadata fields to keep track of which parts of the filesystem have been observed and which parts were observed to be unhealthy, and print a warning at unmount time if we have unfixed problems. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_icache.c')
-rw-r--r--fs/xfs/xfs_icache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
index 245483cc282b..f93924d26630 100644
--- a/fs/xfs/xfs_icache.c
+++ b/fs/xfs/xfs_icache.c
@@ -70,6 +70,8 @@ xfs_inode_alloc(
ip->i_flags = 0;
ip->i_delayed_blks = 0;
memset(&ip->i_d, 0, sizeof(ip->i_d));
+ ip->i_sick = 0;
+ ip->i_checked = 0;
return ip;
}
@@ -446,6 +448,8 @@ xfs_iget_cache_hit(
ip->i_flags |= XFS_INEW;
xfs_inode_clear_reclaim_tag(pag, ip->i_ino);
inode->i_state = I_NEW;
+ ip->i_sick = 0;
+ ip->i_checked = 0;
ASSERT(!rwsem_is_locked(&inode->i_rwsem));
init_rwsem(&inode->i_rwsem);