• Eric Sandeen's avatar
    quota: add new quotactl Q_XGETNEXTQUOTA · 8b375249
    Eric Sandeen authored
    Q_XGETNEXTQUOTA 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 requested 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.
    
    This allows filesystems to do efficient iteration in kernelspace,
    much like extN filesystems do in userspace when asked to report
    all active quotas.
    
    The patch adds a d_id field to struct qc_dqblk so that we can
    pass back the id of the quota which was found, and return it
    to userspace.
    
    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.
    Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
    Reviewed-by: default avatarJan Kara <jack@suse.cz>
    Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
    8b375249
dqblk_xfs.h 8.72 KB