]> Git Repo - linux.git/commitdiff
xfs: prevent rt growfs when quota is enabled
authorDarrick J. Wong <[email protected]>
Mon, 16 Oct 2023 16:21:05 +0000 (09:21 -0700)
committerDarrick J. Wong <[email protected]>
Tue, 17 Oct 2023 23:22:40 +0000 (16:22 -0700)
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 <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
fs/xfs/xfs_rtalloc.c

index 16534e9873f69449644992dbb8b8797684713e4b..31fd65b3aaa9a27ead4cae637545fc1d14ce01c3 100644 (file)
@@ -954,7 +954,7 @@ xfs_growfs_rt(
                return -EINVAL;
 
        /* Unsupported realtime features. */
-       if (xfs_has_rmapbt(mp) || xfs_has_reflink(mp))
+       if (xfs_has_rmapbt(mp) || xfs_has_reflink(mp) || xfs_has_quota(mp))
                return -EOPNOTSUPP;
 
        nrblocks = in->newblocks;
This page took 0.053869 seconds and 4 git commands to generate.