]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: check if an inode is cached and allocated
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 19 Jun 2017 15:58:56 +0000 (08:58 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 19 Jun 2017 21:11:34 +0000 (14:11 -0700)
commitbfa9aa96c6cbc8ea6115c8b11a08cd7d30eba9b7
tree7d5ab6268ac52f10a6085c3a1edaaea83d83f30b
parentc4f250e3203efd08cc842d3f1fb94e01e5a50891
xfs: check if an inode is cached and allocated

Check the inode cache for a particular inode number.  If it's in the
cache, check that it's not currently being reclaimed.  If it's not being
reclaimed, return zero if the inode is allocated.  This function will be
used by various scrubbers to decide if the cache is more up to date
than the disk in terms of checking if an inode is allocated.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/xfs_icache.c
fs/xfs/xfs_icache.h