Q_XQUOTAON(2const)
π Q_XQUOTAON β it's giving "quota szn" π
okay bestie, welcome to Q_XQUOTAON(2const), a lil page from the Linux man-pages family. yes it's a 2const page, which is just manpage-speak for "this is one specific request code you pass to a bigger syscall," iykyk. the bigger syscall here is quotactl(2) (and its fd-flavored sibling quotactl_fd(2)), and this constant's whole job is turning quotas ON for an XFS filesystem. no cap. π
πΈ NAME πΈ
Q_XQUOTAON β turn on quotas for an XFS filesystem β¨
basically: quota accounting and quota limit enforcement? we're switching them ON, bestie. main character energy only. π
π«Ά LIBRARY π«Ά
Standard C library β that's libc, aka -lc. the cozy classic. π
β¨ SYNOPSIS β¨
okay so there are two ways to slide into this call, depending on which wrapper you're vibing with. first up, the one you get through quotactl(2):
#include <xfs/xqm.h> /* See quotactl(2) */
#include <sys/quota.h>
int quotactl(QCMD(Q_XQUOTAON, type), const char *_Nullable special, 0,
caddr_t addr);
and then the quotactl_fd(2) route, which goes through raw syscall(2) energy (yes we're being extra, yes it's necessary):
#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_XQUOTAON, type), 0,
unsigned int *addr);
note the _Nullable on special, note the literal 0 sitting in the third slot like it owns the place, and note that addr is a caddr_t in one and an unsigned int * in the other. copy-paste responsibly bestie π«Ά
π DESCRIPTION π
Turn on quotas for an XFS filesystem. that's the whole mission. π¦
now here's the tea: XFS is built different. it lets you turn quota limit enforcement on and off completely separately from quota accounting. so instead of one boring on/off switch, XFS expects addr to be a pointer to an unsigned int that holds a bitwise combination of these flags (all defined in <xfs/xqm.h>):
XFS_QUOTA_UDQ_ACCT /* User quota accounting */
XFS_QUOTA_UDQ_ENFD /* User quota limits enforcement */
XFS_QUOTA_GDQ_ACCT /* Group quota accounting */
XFS_QUOTA_GDQ_ENFD /* Group quota limits enforcement */
XFS_QUOTA_PDQ_ACCT /* Project quota accounting */
XFS_QUOTA_PDQ_ENFD /* Project quota limits enforcement */
so yeah β user, group, project, and for each one you can pick accounting, enforcement, or both (that's the bitwise OR moment β¨). you mix and match, you hand over the pointer, you slay.
π¨ real talk though: this operation requires privilege β specifically CAP_SYS_ADMIN. no cap, no quota-on. if you don't have it, the kernel is not gonna let you in the group chat. π
π₯ RETURN VALUE π₯
See quotactl(2). (the details live over there, bestie β we're not re-typing them, that's just how these pages do.) π
π ERRORS π
See quotactl(2). same deal. the error lore is in that page. π
π STANDARDS π
Linux. π§ iconic, obviously.
β HISTORY β
Linux. β the origin story is short and sweet.
π SEE ALSO π
go read these next, fr fr:
quotactl(2)quotactl_fd(2)Q_XQUOTAOFF(2const)β the opposite twin, the "turn it back off" era π
and that's a wrap on Q_XQUOTAON(2const)! this lil masterpiece comes to you from Linux man-pages 6.20, dated 2026-06-05. go forth, enable your quotas, drink water, and remember: accounting is not enforcement. ππ¦β¨π
π¦ 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