Q_XQUOTARM(2const)
π
Q_XQUOTARM (from the 2const manual, bestie)
okay so this is a little page from the Linux man-pages (specifically the 2const corner of the manual) and it's all about Q_XQUOTARM β the quotactl command that frees up the disk space that disk quotas were hogging. She's niche. She's specific. She's iconic. Let's get into it π
β¨ NAME β¨
Q_XQUOTARM β free disk space taken by disk quotas π«Ά
π LIBRARY π
Standard C library (libc, -lc). yeah. the classic. the moment.
πΈ SYNOPSIS πΈ
first up, the quotactl(2) route:
#include <xfs/xqm.h> /* See quotactl(2) */
#include <sys/quota.h>
int quotactl(QCMD(Q_XQUOTARM, type), const char *_Nullable special, 0,
caddr_t addr);
and then the quotactl_fd(2) glow-up route, lowkey the cooler one ngl:
#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_XQUOTARM, type), 0,
unsigned int *addr);
π DESCRIPTION π
bestie, the whole point: free the disk space taken by disk quotas. that's it, that's the job. π§Ήβ¨
so the addr argument? she should be a pointer to an unsigned int value that holds flags β and these are literally the same flags as in the .d_flags field of the fs_disk_quota(2type) structure. those flags are the ones that tell the system what types of quota should be removed. π―
β οΈ and here's the thing bestie β the quotas must have already been turned off. like, off off. this function is not gonna turn them off for you, she's just here to clean up after. don't come at her expecting her to do both jobs π
π₯ RETURN VALUE π₯
go look at quotactl(2). that's where the tea is. π
π ERRORS π
again β quotactl(2). same energy.
but there's one special little star of the show here:
EINVAL(since Linux 5.5) βaddrdoes not point to valid quota types. so, like, if your pointer is pointing at nonsense? yeah, that's a no from her. π
π STANDARDS π
Linux. periodt. π
π¦ HISTORY π¦
Buggy until Linux 3.16. not her fault, she was going through something. she's better now. π
π CAVEATS π
listen up, this one's important:
the quota type argument is ignored β like, fully, unbothered, didn't read it β BUT it should still remain valid, because it needs to get past the preliminary quotactl syscall handler checks. so it's giving decorative but also mandatory. she's a formality with consequences. slay. β¨
π SEE ALSO π
that's the whole page, bestie, no crumbs left π and uh, credit where it's due β this came from Linux man-pages 6.20, dated 2026-06-05. go off, man-pages maintainers, we love you fr fr πβ¨π«Ά
π¦ 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