Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q_XGETNEXTQUOTA: API for fast querying of quota for uid ranges #2

Open
arekm opened this issue Nov 26, 2021 · 0 comments
Open

Q_XGETNEXTQUOTA: API for fast querying of quota for uid ranges #2

arekm opened this issue Nov 26, 2021 · 0 comments

Comments

@arekm
Copy link

arekm commented Nov 26, 2021

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant