summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_quota.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-07-14 11:16:03 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-11-09 19:08:10 -0800
commit74846244fd6c65a5e6f5c7842ef7f6978bfaef7b (patch)
tree41af058fc83d8b14ee352a49a9785a6d59789f93 /fs/xfs/xfs_quota.h
parent24aed3cd2363dd5a8734dd7a68de0fb54771cf85 (diff)
xfs: enable CoW for realtime data
Update our write paths to support copy on write on the rt volume. This works in more or less the same way as it does on the data device, with the major exception that we never do delalloc on the rt volume. Because we consider unwritten CoW fork staging extents to be incore quota reservation, we update xfs_quota_reserve_blkres to support this case. Though xfs doesn't allow rt and quota together, the change is trivial and we shouldn't leave a logic bomb here. While we're at it, add a missing xfs_mod_delalloc call when we remove delalloc block reservation from the inode. This is largely irrelvant since realtime files do not use delalloc, but we want to avoid leaving logic bombs. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_quota.h')
-rw-r--r--fs/xfs/xfs_quota.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/xfs/xfs_quota.h b/fs/xfs/xfs_quota.h
index 0cb52d5be4aa..fa34d997b747 100644
--- a/fs/xfs/xfs_quota.h
+++ b/fs/xfs/xfs_quota.h
@@ -124,11 +124,7 @@ int xfs_qm_mount_quotas(struct xfs_mount *mp);
extern void xfs_qm_unmount(struct xfs_mount *);
extern void xfs_qm_unmount_quotas(struct xfs_mount *);
-static inline int
-xfs_quota_reserve_blkres(struct xfs_inode *ip, int64_t blocks)
-{
- return xfs_trans_reserve_quota_nblks(NULL, ip, blocks, 0, false);
-}
+int xfs_quota_reserve_blkres(struct xfs_inode *ip, int64_t blocks);
bool xfs_inode_near_dquot_enforcement(struct xfs_inode *ip, xfs_dqtype_t type);
# ifdef CONFIG_XFS_LIVE_HOOKS