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>
这个提交包含在:
@@ -47,6 +47,7 @@ struct xfs_eofblocks {
|
||||
#define XFS_IGET_CREATE 0x1
|
||||
#define XFS_IGET_UNTRUSTED 0x2
|
||||
#define XFS_IGET_DONTCACHE 0x4
|
||||
#define XFS_IGET_INCORE 0x8 /* don't read from disk or reinit */
|
||||
|
||||
/*
|
||||
* flags for AG inode iterator
|
||||
@@ -126,4 +127,7 @@ xfs_fs_eofblocks_from_user(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int xfs_icache_inode_is_allocated(struct xfs_mount *mp, struct xfs_trans *tp,
|
||||
xfs_ino_t ino, bool *inuse);
|
||||
|
||||
#endif
|
||||
|
在新工单中引用
屏蔽一个用户