Q_XGETQSTATV(2const)

๐Ÿ“ฆ
version 6.20 ยท 2 versions
, in arch rolling, nixpkgs unstable

๐Ÿ’– 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, only FS_QSTAT_VERSION1 is 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 โ€” the XFS_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
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms