linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] quota: add new quotactl Q_XGETQUOTA2
@ 2016-01-08 16:56 Eric Sandeen
  2016-01-08 16:57 ` [PATCH 1/4] " Eric Sandeen
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Eric Sandeen @ 2016-01-08 16:56 UTC (permalink / raw)
  To: fsdevel, xfs; +Cc: Jan Kara

This adds a new quotactl, Q_XGETQUOTA2.

Q_XGETQUOTA2 is exactly like Q_XGETQUOTA, except that it will
return quota information for the id equal to or greater than
the id requested.  In other words, if the specified id has
no quota, the command will return quota information for the
next higher id which does have a quota set.  If no higher id
has an active quota, -ESRCH is returned.

So if you ask for id X, you can get back quota for id X,
id X+N, or -ESRCH if no higher id has a quota.

This allows filesystems to do efficient iteration in kernelspace,
much like extN filesystems do in userspace when asked to report
all active quotas.

Today, filesystems such as XFS require getpwent()-style iterations,
and for systems which have i.e. LDAP backends, this can be very
slow, or even impossible, if iteration is not allowed in the
configuration.

I have patches to xfsprogs to allow xfs_quota to use this interface,
but I haven't looked at generic quota tools yet TBH.  I'll send the
xfsprogs patches to the xfs list shortly.

Using an id as input fits very nicely with existing interfaces;
however, I could imagine that making it a more generic "cookie"
interface might be more extensible; is there any filesystem which
wouldn't be collecting all active IDs in a linear fashion, and
would rather have an arbitrary cookie passed back & forth?
(I hope not) :)

Thanks,
-Eric

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2016-01-18 15:40 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-08 16:56 [PATCH 0/4] quota: add new quotactl Q_XGETQUOTA2 Eric Sandeen
2016-01-08 16:57 ` [PATCH 1/4] " Eric Sandeen
2016-01-08 16:57 ` [PATCH 2/4] xfs: get quota inode from mp & flags rather than dqp Eric Sandeen
2016-01-08 16:58 ` [PATCH 3/4] xfs: Factor xfs_seek_hole_data into helper Eric Sandeen
2016-01-11 15:57   ` Jan Kara
2016-01-11 16:01   ` [PATCH 3/4 V3] " Eric Sandeen
2016-01-08 16:59 ` [PATCH 4/4] xfs: wire up Q_XGETQUOTA2 / get_dqblk2 Eric Sandeen
2016-01-08 18:36 ` [PATCH] linux-quota: wire Q_XGETQUOTA2 into generic repquota Eric Sandeen
2016-01-09  7:26 ` [PATCH 0/4] quota: add new quotactl Q_XGETQUOTA2 Christoph Hellwig
2016-01-11 13:26   ` Jan Kara
2016-01-11 16:07     ` Eric Sandeen
2016-01-11 16:28       ` Jan Kara
2016-01-13 22:40         ` Eric Sandeen
2016-01-15  9:35           ` Jan Kara
2016-01-15 17:31             ` Eric Sandeen
2016-01-15 19:38               ` Eric Sandeen
2016-01-18 10:33               ` Jan Kara
2016-01-18 11:00                 ` Christoph Hellwig
2016-01-18 15:18                 ` Eric Sandeen
2016-01-18 15:40                   ` Jan Kara
2016-01-15 22:50             ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).