Q_XQUOTARM(2const)

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

πŸ’… 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) β€” addr does 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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms