Q_XGETQSTATV(2const)
๐ Q_XGETQSTATV ๐
okay bestie, so this is Q_XGETQSTATV โ it gets you the XFS-specific quota info. you know, the good stuff. ๐
This page lives in the 2const manual, and heads up, Q_XGETQSTATV is part of the Linux man-pages project (that's the Linux man-pages 6.20 situation), and we're rocking a 2026-06-05 date on this bad boy. hold that thought, there's a cute lil sign-off at the bottom. ๐
๐ LIBRARY
Standard C library (libc, -lc). the classic. ๐ซถ
โจ SYNOPSIS โจ
here's the vibe, three ways to roll up:
#include <xfs/xqm.h> /* See quotactl(2) */
#include <sys/quota.h>
int quotactl(QCMD(Q_XGETQSTATV, 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_XGETQSTATV, type), 0,
struct fs_quota_statv *addr);
#include <xfs/xqm.h> /* See quotactl_fd(2) */
#define FS_QSTATV_VERSION1 1
struct fs_quota_statv {
int8_t qs_version;
uint8_t qs_pad1;
uint16_t qs_flags;
uint32_t qs_incoredqs;
struct fs_qfilestatv qs_uquota;
struct fs_qfilestatv qs_gquota;
struct fs_qfilestatv qs_pquota;
int32_t qs_btimelimit;
int32_t qs_itimelimit;
int32_t qs_rtbtimelimit;
uint16_t qs_bwarnlimit;
uint16_t qs_iwarnlimit;
uint64_t qs_pad2[8];
};
struct fs_qfilestatv {
uint64_t qfs_ino;
uint64_t qfs_nblks;
uint32_t qfs_nextents;
uint32_t qfs_pad;
};
๐ธ DESCRIPTION ๐ธ
So what does this actually DO? It hands you back XFS filesystem-specific quota information, and it drops it into that fs_quota_statv that addr is pointing at. โจ
Now the tea on why this version eats: compared to Q_XGETQSTAT(2const), this one uses a structure with proper versioning support, plus the layout is correct (every single field is naturally aligned) and it's got padding so there's no special compat handling mess. and as if that wasn't enough of a serve, it also gives you the ability to get statistics about the project quota file. periodt. ๐
๐ง struct fs_quota_statv
.qs_versionโ you gotta fill this in yourself with the version of the structure that the callee supports. for now, onlyFS_QSTAT_VERSION1is supported, that's the whole menu. the kernel will fill the structure in accordance with the version you provided. ๐.qs_pad1โ padding, for 16-bit alignment. it's just holding space, not the main character..qs_flagsโ theXFS_QUOTA_*flags..qs_incoredqsโ number of dquots incore..qs_uquotaโ user quota information..qs_gquotaโ group quota information..qs_pquotaโ project quota information..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..qs_pad2โ for future proofing. it's giving forward-thinking icon. ๐ฎ
๐ฆ struct fs_qfilestatv
.qfs_inoโ inode number..qfs_nblksโ number of BBs 512-byte-blocks..qfs_nextentsโ number of extents..qfs_padโ padding, for 8-byte alignment.
โญ RETURN VALUE โญ
See quotactl(2). (yeah bestie, it's a cross-reference situation, go peek over there ๐)
๐ ERRORS ๐
See quotactl(2). same deal. ๐ฅ
๐ STANDARDS ๐
Linux. that's it, that's the standard. no cap.
๐ HISTORY ๐
Linux. yes, again. iconic of it.
๐ SEE ALSO ๐
and that's the whole page, bestie!! ๐ซถ๐ this one came from the Linux man-pages, version 6.20, and it was dated 2026-06-05 โ so if you're reading this way later, just know we said it with love back then. go forth and get those XFS quota stats. slay. โจ๐ฆ๐
๐ฆ 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