diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-09-01 11:15:55 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-12-15 17:29:11 -0800 |
commit | ffe7e7772e191c6f9ebbd4ee383fe8e01df3132b (patch) | |
tree | c28395b40881030bfc89276b2103ab09e628af0b /fs/xfs/xfs_rtalloc.h | |
parent | 48fb408a0c736ea2c1f5557286de1c7026937267 (diff) |
xfs: refactor realtime inode lockingrefactor-rt-locking_2021-12-15
Refactor realtime metadata inode locking so that we can get some sense
here.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.h')
-rw-r--r-- | fs/xfs/xfs_rtalloc.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/xfs/xfs_rtalloc.h b/fs/xfs/xfs_rtalloc.h index ca6ee2f13cbc..a0d0e161d804 100644 --- a/fs/xfs/xfs_rtalloc.h +++ b/fs/xfs/xfs_rtalloc.h @@ -140,6 +140,13 @@ int xfs_rtalloc_extent_is_free(struct xfs_mount *mp, struct xfs_trans *tp, bool *is_free); int xfs_rtfile_convert_unwritten(struct xfs_inode *ip, loff_t pos, uint64_t len); + +#define XFS_RTLOCK_ALLOC (1 << 0) /* rt allocation */ +#define XFS_RTLOCK_ALL (XFS_RTLOCK_ALLOC) + +void xfs_rtlock(struct xfs_trans *tp, struct xfs_mount *mp, + unsigned int rtlock_flags); +void xfs_rtunlock(struct xfs_mount *mp, unsigned int lock_flags); #else # define xfs_rtallocate_extent(t,b,min,max,l,f,p,rb) (ENOSYS) # define xfs_rtfree_extent(t,b,l) (ENOSYS) @@ -164,6 +171,8 @@ xfs_rtmount_init( # define xfs_rtmount_inodes(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (ENOSYS)) # define xfs_rtunmount_inodes(m) # define xfs_rtfile_convert_unwritten(ip, pos, len) (0) +# define xfs_rtlock(tp, mp, lock_flags) do { } while (0) +# define xfs_rtunlock(mp, lock_flags) do { } while (0) #endif /* CONFIG_XFS_RT */ #endif /* __XFS_RTALLOC_H__ */ |