Linux kernel supports feature that allows for fast and efficient querying of all quota in the filesystem.
It's Q_XGETNEXTQUOTA ioctl.
https://patchwork.kernel.org/project/linux-fsdevel/patch/1453487136-12681-3-git-send-email-sandeen@redhat.com/
This is feature request about adding support for it.
As simple API like:
(uid, bcount, bsoft, bhard, btime, icount, isoft, ihard, itime) = qObj.querynext(uid [,grpquota=1] [,prjquota=1])
or more complicated like
queryrange(uid, uid_last=False,...)
returning dictionary of uids with their quota tuples (or something like that)
For systems that don't support this feature it could be emulated by iterating from uid to (uid_t)-1 until found but... that can be a lot (if for example there is no single uid with quotas above our called uid). Or just FsQuota.error(ENOTSUP).
Linux kernel supports feature that allows for fast and efficient querying of all quota in the filesystem.
It's Q_XGETNEXTQUOTA ioctl.
https://patchwork.kernel.org/project/linux-fsdevel/patch/1453487136-12681-3-git-send-email-sandeen@redhat.com/
This is feature request about adding support for it.
As simple API like:
(uid, bcount, bsoft, bhard, btime, icount, isoft, ihard, itime) = qObj.querynext(uid [,grpquota=1] [,prjquota=1])
or more complicated like
queryrange(uid, uid_last=False,...)
returning dictionary of uids with their quota tuples (or something like that)
For systems that don't support this feature it could be emulated by iterating from uid to (uid_t)-1 until found but... that can be a lot (if for example there is no single uid with quotas above our called uid). Or just FsQuota.error(ENOTSUP).