Skip to content

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

@arekm

Description

@arekm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions