diff options
| author | Darrick J. Wong <[email protected]> | 2024-07-02 18:22:31 +0000 |
|---|---|---|
| committer | Darrick J. Wong <[email protected]> | 2024-07-02 18:36:55 +0000 |
| commit | d76e137057ae84e0ca1aac54a1f1ae7c0596c1cd (patch) | |
| tree | 9699a4f996fc273e49911ab1f169b19511f95199 /fs/xfs/xfs_inode.c | |
| parent | xfs: use consistent uid/gid when grabbing dquots for inodes (diff) | |
| download | kernel-d76e137057ae84e0ca1aac54a1f1ae7c0596c1cd.tar.gz kernel-d76e137057ae84e0ca1aac54a1f1ae7c0596c1cd.zip | |
xfs: move inode copy-on-write predicates to xfs_inode.[ch]
Move these inode predicate functions to xfs_inode.[ch] since they're not
reflink functions.
Signed-off-by: Darrick J. Wong <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
| -rw-r--r-- | fs/xfs/xfs_inode.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index fd1a59af6cbb..dd2b80d5d344 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -4297,3 +4297,11 @@ xfs_inode_alloc_unitsize( return XFS_FSB_TO_B(ip->i_mount, blocks); } + +/* Should we always be using copy on write for file writes? */ +bool +xfs_is_always_cow_inode( + struct xfs_inode *ip) +{ + return ip->i_mount->m_always_cow && xfs_has_reflink(ip->i_mount); +} |
