diff options
| author | Darrick J. Wong <[email protected]> | 2024-11-21 00:21:17 +0000 |
|---|---|---|
| committer | Darrick J. Wong <[email protected]> | 2024-12-23 21:06:17 +0000 |
| commit | 155debbe7e627baf6439e75f15856d40ec115c5d (patch) | |
| tree | f0c56ed17b5624e7417421d08ff5dd5aa6ab3691 /fs/xfs/xfs_rtalloc.c | |
| parent | xfs: fix CoW forks for realtime files (diff) | |
| download | kernel-155debbe7e627baf6439e75f15856d40ec115c5d.tar.gz kernel-155debbe7e627baf6439e75f15856d40ec115c5d.zip | |
xfs: enable realtime reflink
Enable reflink for realtime devices, as long as the realtime allocation
unit is a single fsblock.
Signed-off-by: "Darrick J. Wong" <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
| -rw-r--r-- | fs/xfs/xfs_rtalloc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 7135a6717a9e..d8e6d073d64d 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -32,6 +32,7 @@ #include "xfs_error.h" #include "xfs_trace.h" #include "xfs_rtrefcount_btree.h" +#include "xfs_reflink.h" /* * Return whether there are any free extents in the size range given @@ -1292,8 +1293,10 @@ xfs_growfs_rt( goto out_unlock; if (xfs_has_quota(mp)) goto out_unlock; - } - if (xfs_has_reflink(mp)) + if (xfs_has_reflink(mp)) + goto out_unlock; + } else if (xfs_has_reflink(mp) && + !xfs_reflink_supports_rextsize(mp, in->extsize)) goto out_unlock; error = xfs_sb_validate_fsb_count(&mp->m_sb, in->newblocks); |
