Q_XGETQSTAT(2const)
π Q_XGETQSTAT β the manual, bestie edition π
okay so this is Q_XGETQSTAT, and it lives in section 2const of the Linux manual pages. it's a quota command constant, it's iconic, and it's about to spill all the XFS tea. let's go π¦
β¨ NAME β¨
Q_XGETQSTAT β get XFS-specific quota information π
π LIBRARY π
Standard C library (libc, -lc) β the classics, no cap.
π SYNOPSIS π
okay so there's literally more than one way to call this, here's all of them exactly as they are:
#include <xfs/xqm.h> /* See quotactl(2) */
#include <sys/quota.h>
int quotactl(QCMD(Q_XGETQSTAT, type), const char *_Nullable special, 0,
caddr_t addr);
#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_XGETQSTAT, type), 0,
struct fs_quota_stat *addr);
and here's the constant plus the structs it hands you, verbatim, do not touch:
#include <xfs/xqm.h> /* See quotactl(2) */
#define FS_QSTAT_VERSION 1 /* fs_quota_stat.qs_version */
struct fs_quota_stat {
int8_t qs_version;
uint16_t qs_flags;
int8_t qs_pad;
struct fs_qfilestat qs_uquota;
struct fs_qfilestat qs_gquota;
uint32_t qs_incoredqs;
int32_t qs_btimelimit;
int32_t qs_itimelimit;
int32_t qs_rtbtimelimit;
uint16_t qs_bwarnlimit;
uint16_t qs_iwarnlimit;
};
struct fs_qfilestat {
uint64_t qfs_ino;
uint64_t qfs_nblks;
uint32_t qfs_nextents;
};
πΈ DESCRIPTION πΈ
so basically it returns XFS filesystem-specific quota information, and it drops all of that into the fs_quota_stat structure that addr points at. simple, clean, slay β¨
it's giving detective energy, because it's useful for finding out how much space is used to store quota information, and also for getting the quota on/off status of a given local XFS filesystem. like, hi, what's your status bestie π
π§ struct fs_quota_stat
.qs_versionβ version number for future changes. it's the little time capsule of versions, lowkey..qs_flagsβXFS_QUOTA_{U,P,G}DQ_{ACCT,ENFD}π.qs_padβ unused. it's just vibing there, taking up space, doing nothing. respect honestly..qs_uquotaβ user quota storage information..qs_gquotaβ group quota storage information..qs_incoredqsβ number of dquots in core..qs_btimelimitβ limit for blocks timer..qs_itimelimitβ limit for inodes timer..qs_rtbtimelimitβ limit for RT blocks timer..qs_bwarnlimitβ limit for # of warnings..qs_iwarnlimitβ limit for # of warnings.
π§ struct fs_quota_stat (the file-stat one, yes it has the same heading as the original, i don't make the rules)
.qfs_inoβ inode number..qfs_nblksβ number of BBs 512-byte-blocks..qfs_nextentsβ number of extents.
π₯ RETURN VALUE π₯
See quotactl(2). that's it, that's the whole section. go read the other one bestie π«Ά
π ERRORS π
See quotactl(2). same deal, the source of truth is over there β¨
π STANDARDS π
Linux. periodt.
π HISTORY π
Linux. also periodt.
π SEE ALSO π
aaaand that's the whole page bestie, you ate it π this was Linux man-pages 6.20, dated 2026-06-05, and it's the Q_XGETQSTAT(2const) page β go forth and stat your quotas, no cap π
β¨
π¦ 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