Skip to content

Commit b73494f

Browse files
author
Darrick J. Wong
committed
xfs: prevent rt growfs when quota is enabled
Quotas aren't (yet) supported with realtime, so we shouldn't allow userspace to set up a realtime section when quotas are enabled, even if they attached one via mount options. IOWS, you shouldn't be able to do: # mkfs.xfs -f /dev/sda # mount /dev/sda /mnt -o rtdev=/dev/sdb,usrquota # xfs_growfs -r /mnt Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
1 parent 6c66448 commit b73494f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/xfs/xfs_rtalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ xfs_growfs_rt(
954954
return -EINVAL;
955955

956956
/* Unsupported realtime features. */
957-
if (xfs_has_rmapbt(mp) || xfs_has_reflink(mp))
957+
if (xfs_has_rmapbt(mp) || xfs_has_reflink(mp) || xfs_has_quota(mp))
958958
return -EOPNOTSUPP;
959959

960960
nrblocks = in->newblocks;

0 commit comments

Comments
 (0)