From: "Theodore Tso" <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: Ravi Singh <ravising@redhat.com>,
linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
adilger@dilger.ca, jack@suse.com, cem@kernel.org
Subject: Re: [PATCH v2] xfs: return default quota limits for IDs without a dquot
Date: Tue, 17 Mar 2026 09:31:59 -0400 [thread overview]
Message-ID: <20260317133159.GA53921@macsyma-wired.lan> (raw)
In-Reply-To: <jknk6pwirqp5kgxdwr7qez2qzuycmj4eupknf3yvqzlnkyiu5k@nowg6cwpxqc3>
On Tue, Mar 17, 2026 at 01:19:23PM +0100, Jan Kara wrote:
> On Tue 17-03-26 14:59:47, Ravi Singh wrote:
> > When an ID has no dquot on disk, Q_XGETQUOTA returns -ENOENT even
> > though default quota limits are configured and enforced against that
> > ID. This means unprivileged users who have never used any resources
> > cannot see the limits that apply to them.
> >
> > When xfs_qm_dqget() returns -ENOENT for a non-zero ID, return a
> > zero-usage response with the default limits filled in from
> > m_quotainfo rather than propagating the error. This is consistent
> > with the enforcement behavior in xfs_qm_adjust_dqlimits(), which
> > pushes the same default limits into a dquot when it is first
> > allocated.
> >
> > Signed-off-by: Ravi Singh <ravising@redhat.com>
>
> So XFS guys should also review this but from quota POV this looks like a
> right fix to me. So feel free to add:
>
> Reviewed-by: Jan Kara <jack@suse.cz>
This was discussed at last week's ext4 conference call, and we
wondered whether we might be better off adding a new
Q_XGETDEFAULTQUOTA or some such which returned the default quota.
This would that the quota userspace utilities would have to be
changed, but it would also mean that userspace could distinguish
between whether the quota limit was due to a default value being used,
or because the user had an actual quota value set.
It also means that in the future, if we wanted to change where the
default quota was stored, it would be possible to do that instead of
overloading the quota value for uid/gid 0.
We also speculated that perhaps there might be cases where if some
process might be running without CAP_SYS_ADMIN, there might be a
reason that quota for uid=0 might actually make sense, and so perhaps
some future file system format change might want to decouple where the
default quota was stored.
This is a API question, and given that I don't really care a whole lot
about quotas (we use quota only for tracking usage, not for actually
enforce quota limits, so I really don't care that much), what do folks
think makes the most amount of sense?
- Ted
next prev parent reply other threads:[~2026-03-17 13:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 9:08 [RFC PATCH] quota: allow unprivileged users to query ID 0 default limits Ravi Singh
2026-03-12 9:45 ` Andreas Dilger
2026-03-17 6:59 ` Ravi Singh
2026-03-17 6:59 ` [PATCH v2] xfs: return default quota limits for IDs without a dquot Ravi Singh
2026-03-17 12:19 ` Jan Kara
2026-03-17 13:31 ` Theodore Tso [this message]
2026-03-18 17:29 ` Jan Kara
2026-03-18 22:18 ` Darrick J. Wong
2026-03-19 12:22 ` Jan Kara
2026-03-23 11:25 ` Ravi Singh
2026-03-25 0:16 ` Darrick J. Wong
2026-03-25 5:46 ` Christoph Hellwig
2026-03-25 9:11 ` Ravi Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260317133159.GA53921@macsyma-wired.lan \
--to=tytso@mit.edu \
--cc=adilger@dilger.ca \
--cc=cem@kernel.org \
--cc=jack@suse.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=ravising@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox