diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-09-01 11:20:13 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-12-15 17:29:26 -0800 |
commit | 960793188a1a1f2106353645d07f5ead37f4bcfa (patch) | |
tree | dd47b51071f9c138365abe35b19a3610e4443151 /fs/xfs/xfs_rtalloc.c | |
parent | 933e306a202f00c5e8971d743cd18f44461be64d (diff) |
xfs: allow reflink on the rt volume when extent size is larger than 1 rt blockrealtime-reflink-extsize_2021-12-15
Make the necessary tweaks to the reflink remapping code to support
remapping on the realtime volume when the rt extent size is larger than
a single rt block. We need to check that the remap arguments from
userspace are aligned to a rt extent boundary, and that the length
is always aligned, even if the kernel tried to round it up to EOF for
us. XFS can only map and remap full rt extents, so we have to be a
little more strict about the alignment there.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
-rw-r--r-- | fs/xfs/xfs_rtalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index efd54174a99e..8b8f83118ca2 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -1063,7 +1063,7 @@ xfs_growfs_rt( if (!xfs_has_metadir(mp) && (xfs_has_rmapbt(mp) || xfs_has_reflink(mp))) return -EOPNOTSUPP; - if (xfs_has_reflink(mp) && in->extsize != 1) + if (xfs_has_reflink(mp) && !is_power_of_2(mp->m_sb.sb_rextsize)) return -EOPNOTSUPP; nrblocks = in->newblocks; |