Q_XGETNEXTQUOTA(2const)
β¨ Q_XGETNEXTQUOTA β bestie, let's go find the next quota β¨
okay so you know those XFS quota things? this is the const-y version, which means it's one of the magic values you shove into quotactl(2) / quotactl_fd(2). it's giving Q_XGETNEXTQUOTA(2const), and it's about getting disk quota limits for the next user or group on an XFS filesystem. π¦
πΈ LIBRARY πΈ
Standard C library (libc, -lc) π
π SYNOPSIS π
first flavor β the classic quotactl(2) route:
#include <xfs/xqm.h> /* See quotactl(2) */
#include <sys/quota.h>
int quotactl(QCMD(Q_XGETNEXTQUOTA, type), const char *_Nullable special,
int id, caddr_t addr);
and second flavor β the fd-based quotactl_fd(2) route (yes she has range):
#include <xfs/xqm.h> /* See quotactl_fd(2) */
#include <sys/syscall.h> /* Definition of SYS_* constants */
#include <unistd.h>
int syscall(SYS_quotactl_fd, int fd, QCMD(Q_XGETNEXTQUOTA, type),
int id, struct fs_disk_quota *addr);
π DESCRIPTION π
so like. it's literally the same thing as Q_XGETQUOTA(2const), okay? same energy. but here's the twist that makes her the main character: instead of just grabbing the quota for id, she returns β in the fs_disk_quota(2type) structure that addr points to β the quota info for the next ID that is greater than or equal to id and actually has a quota set. π₯
and here's a cute little detail β fs_disk_quota(2type) already has a q_id field, so no separate structure type is needed here. that's in contrast with Q_GETQUOTA(2const) and Q_GETNEXTQUOTA(2const), who need their own thing. iconic, honestly. π
π RETURN VALUE π
See quotactl(2). that's it, that's the whole vibe. π
π ERRORS π
See quotactl(2).
plus one that's just for us:
ESRCHβ there is no ID greater than or equal toidthat has an active quota. like, you looked, bestie, and she's just not there. π
π STANDARDS π
Linux. (we stay on brand π§)
β HISTORY β
Linux 4.6 β a certified classic, fr fr.
π«Ά SEE ALSO π«Ά
okay that's the whole page, no cap. huge slay to Linux man-pages 6.20, dated 2026-06-05 β go read quotactl(2) when you're done, ily, bye πβ¨ππ¦
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- Copyright 1996, Andries E. Brouwer <aeb@cwi.nl>
- Copyright 2010, Jan Kara <jack@suse.cz>
- Copyright 2010, Michael Kerrisk <mtk.manpages@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms