Q_XGETNEXTQUOTA(2const)

πŸ“¦
version 6.20 Β· 2 versions
, in arch rolling, nixpkgs unstable

✨ 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 to id that 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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms