summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_rtalloc.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-09-01 11:20:13 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-09-17 18:55:27 -0700
commit75cb7d368753500f6bff423b922e97a2d064a312 (patch)
tree3259baaecf20f5abcc86b71d7e8abf0d9c4ecd93 /fs/xfs/xfs_rtalloc.c
parentdf2537664cbc20922c701b5aef068128e37af58d (diff)
xfs: allow reflink on the rt volume when extent size is larger than 1 rt blockrealtime-reflink-extsize_2021-09-17
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index 15f5a405d7d4..0a1114df236f 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -1039,7 +1039,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;