---
name: "Q_XGETQSTATV"
section: "2const"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/Q_XGETQSTATV"
---

# Q\_XGETQSTATV(2const)

get XFS-specific quota information

## NAME

Q\_XGETQSTATV - get XFS-specific quota information

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#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)](/quotactl_fd/2.md) \*/ **#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)](/quotactl_fd/2.md) \*/

```
#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

Returns XFS filesystem-specific quota information in the *fs\_quota\_statv* pointed to by *addr*.

This version of the operation (compared to [**Q\_XGETQSTAT**(2const)](/Q_XGETQSTAT/2const.md)) uses a structure with proper versioning support, along with appropriate layout (all fields are naturally aligned) and padding to avoiding special compat handling; it also provides the ability to get statistics regarding the project quota file.

### struct fs\_quota\_statv

- *.qs\_version*

  This field should be filled with the version of the structure supported by the callee (for now, only *FS\_QSTAT\_VERSION1* is supported). The kernel will fill the structure in accordance with the version provided.

- *.qs\_pad1*

  Pad for 16-bit alignment.

- *.qs\_flags*

  **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.

### struct fs\_qfilestatv

- *.qfs\_ino*

  Inode number.

- *.qfs\_nblks*

  Number of BBs 512-byte-blocks.

- *.qfs\_nextents*

  Number of extents.

- *.qfs\_pad*

  Pad for 8-byte alignment.

## RETURN VALUE

See [**quotactl**(2)](/quotactl/2.md).

## ERRORS

See [**quotactl**(2)](/quotactl/2.md).

## STANDARDS

Linux.

## HISTORY

Linux.

## SEE ALSO

[**quotactl**(2)](/quotactl/2.md), [**quotactl\_fd**(2)](/quotactl_fd/2.md)
