Skip to content

Commit edc038f

Browse files
author
Darrick J. Wong
committed
xfs: enable realtime quota again
Enable quotas for the realtime device. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
1 parent b7020ba commit edc038f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

fs/xfs/xfs_qm.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,10 +1663,11 @@ xfs_qm_mount_quotas(
16631663
uint sbf;
16641664

16651665
/*
1666-
* If quotas on realtime volumes is not supported, we disable
1667-
* quotas immediately.
1666+
* If quotas on realtime volumes is not supported, disable quotas
1667+
* immediately. We only support rtquota if rtgroups are enabled to
1668+
* avoid problems with older kernels.
16681669
*/
1669-
if (mp->m_sb.sb_rextents) {
1670+
if (mp->m_sb.sb_rextents && !xfs_has_rtgroups(mp)) {
16701671
xfs_notice(mp, "Cannot turn on quotas for realtime filesystem");
16711672
mp->m_qflags = 0;
16721673
goto write_changes;

fs/xfs/xfs_rtalloc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,9 @@ xfs_growfs_rt(
12651265

12661266
/* Unsupported realtime features. */
12671267
error = -EOPNOTSUPP;
1268-
if (xfs_has_rmapbt(mp) || xfs_has_reflink(mp) || xfs_has_quota(mp))
1268+
if (xfs_has_quota(mp) && !xfs_has_rtgroups(mp))
1269+
goto out_unlock;
1270+
if (xfs_has_rmapbt(mp) || xfs_has_reflink(mp))
12691271
goto out_unlock;
12701272

12711273
error = xfs_sb_validate_fsb_count(&mp->m_sb, in->newblocks);

0 commit comments

Comments
 (0)