Re: [PATCH v2] xfs: return default quota limits for IDs without a dquot

Christoph Hellwig
2026-03-25T05:47:01Z

On Tue, Mar 24, 2026 at 05:16:21PM -0700, Darrick J. Wong wrote:
> > Without fix: empty output
> > With fix:
> > Disk quotas for User testuser8 (1003)
> > Filesystem Blocks Quota Limit Warn/Time Mounted on
> > /dev/vde 0 10240 20480 00 [--------] /mnt/test
>
> Hmm, yes, that looks like a bug to me.

Agreed.

> > Scenario 2: dquot exists with non-zero counts but zero limits (v2 does NOT fix):
> >
> > A dquot is created for testuser8 before default limits are configured.
> > When the chown runs, xfs_qm_adjust_dqlimits() is called in
> > xfs_trans_apply_dquot_deltas(), but the defaults are all zero at that
> > point so nothing is pushed into the dquot. When the admin later sets
> > limits on ID 0, testuser8's existing dquot is not retroactively updated.
> > xfs_qm_dqget() succeeds and XFS_IS_DQUOT_UNINITIALIZED is
> > false (q_ino.count != 0), so xfs_qm_scall_getquota_fill_qc() returns
> > the dquot's zero limits.
>
> I think this is a difference in opinion -- the last time I checked, the
> default limits are only supposed to be propagated to newly allocated
> ondisk dquots.

Yes.

> I don't think we should create more userspace abi since nobody seems to
> think that anyone uses quota limit reporting aggressively. But if
> anyone does, now would be a good time to say something.

Agreed. The fix one looks sensible, and everything else at this point
feels like a candidate for better documentation of the current
semantics.