.\" Copyright 1996, Andries E. Brouwer <aeb@cwi.nl>
.\" Copyright 2010, Jan Kara <jack@suse.cz>
.\" Copyright 2010, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Copyright, the authors of the Linux man-pages project
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.TH Q_XGETNEXTQUOTA 2const 2026-06-05 "Linux man-pages 6.19"
.SH NAME
Q_XGETNEXTQUOTA
\-
get disk quota limits for next user or group for an XFS filesystem
.SH LIBRARY
Standard C library
.RI ( libc ,\~ \-lc )
.SH SYNOPSIS
.nf
.BR "#include <xfs/xqm.h>" "      /* See quotactl(2) */"
.B #include <sys/quota.h>
.P
.BI "int\~quotactl(QCMD(Q_XGETNEXTQUOTA, " type "), const\~char\~*_Nullable\~" special ,
.BI "             int\~" id ", caddr_t\~" addr );
.P
.BR "#include <xfs/xqm.h>" "      /* See quotactl_fd(2) */"
.BR "#include <sys/syscall.h>" "  /* Definition of " SYS_* " constants */"
.B #include <unistd.h>
.P
.BI "int\~syscall(SYS_quotactl_fd, int " fd ", QCMD(Q_XGETNEXTQUOTA, " type ),
.BI "             int\~" id ", struct\~fs_disk_quota\~*" addr );
.fi
.SH DESCRIPTION
This operation is the same as
.BR Q_XGETQUOTA (2const),
but it returns (in the
.BR fs_disk_quota (2type)
structure pointed to by
.IR addr )
quota information for the next ID greater than or equal to
.I id
that has a quota set.
.P
Since
.BR fs_disk_quota (2type)
already has
.I q_id
field, no separate structure type is needed (in contrast with
.BR Q_GETQUOTA (2const)
and
.BR Q_GETNEXTQUOTA (2const)).
.SH RETURN VALUE
See
.BR quotactl (2).
.SH ERRORS
See
.BR quotactl (2).
.TP
.B ESRCH
There is no ID greater than or equal to
.I id
that has an active quota.
.SH STANDARDS
Linux.
.SH HISTORY
Linux 4.6.
.\" commit 8b37524962b9c54423374717786198f5c0820a28
.SH SEE ALSO
.BR quotactl (2),
.BR quotactl_fd (2),
.BR Q_XGETQUOTA (2const),
.BR fs_disk_quota (2type)
