---
name: "Q_XGETQSTAT"
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_XGETQSTAT"
---

# Q\_XGETQSTAT(2const)

get XFS-specific quota information

## NAME

Q\_XGETQSTAT - 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\_XGETQSTAT,** *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\_XGETQSTAT,** *type***), 0,**             **struct fs\_quota\_stat \****addr***);**

**#include \<xfs/xqm.h\>**      /\* See [quotactl(2)](/quotactl/2.md) \*/

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

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

This is useful for finding out how much space is used to store quota information, and also to get the quota on/off status of a given local XFS filesystem.

### struct fs\_quota\_stat

- *.qs\_version*

  Version number for future changes.

- *.qs\_flags*

  **XFS\_QUOTA\_**{**U**,**P**,**G**}**DQ\_**{**ACCT**,**ENFD**}

- *.qs\_pad*

  Unused.

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

- *.qfs\_ino*

  Inode number.

- *.qfs\_nblks*

  Number of BBs 512-byte-blocks.

- *.qfs\_nextents*

  Number of extents.

## 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), [**Q\_XGETQSTATV**(2const)](/Q_XGETQSTATV/2const.md)
