Commit b73494fa authored by Darrick J. Wong's avatar Darrick J. Wong

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: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent 6c664484
...@@ -954,7 +954,7 @@ xfs_growfs_rt( ...@@ -954,7 +954,7 @@ xfs_growfs_rt(
return -EINVAL; return -EINVAL;
/* Unsupported realtime features. */ /* 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; return -EOPNOTSUPP;
nrblocks = in->newblocks; nrblocks = in->newblocks;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment