Skip to content

Commit

Permalink
xfs: enable realtime quota again
Browse files Browse the repository at this point in the history
Enable quotas for the realtime device.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Darrick J. Wong committed Nov 5, 2024
1 parent b7020ba commit edc038f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions fs/xfs/xfs_qm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1663,10 +1663,11 @@ xfs_qm_mount_quotas(
uint sbf;

/*
* If quotas on realtime volumes is not supported, we disable
* quotas immediately.
* If quotas on realtime volumes is not supported, disable quotas
* immediately. We only support rtquota if rtgroups are enabled to
* avoid problems with older kernels.
*/
if (mp->m_sb.sb_rextents) {
if (mp->m_sb.sb_rextents && !xfs_has_rtgroups(mp)) {
xfs_notice(mp, "Cannot turn on quotas for realtime filesystem");
mp->m_qflags = 0;
goto write_changes;
Expand Down
4 changes: 3 additions & 1 deletion fs/xfs/xfs_rtalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,9 @@ xfs_growfs_rt(

/* Unsupported realtime features. */
error = -EOPNOTSUPP;
if (xfs_has_rmapbt(mp) || xfs_has_reflink(mp) || xfs_has_quota(mp))
if (xfs_has_quota(mp) && !xfs_has_rtgroups(mp))
goto out_unlock;
if (xfs_has_rmapbt(mp) || xfs_has_reflink(mp))
goto out_unlock;

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

0 comments on commit edc038f

Please sign in to comment.