---
name: "Q_XGETQUOTA"
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_XGETQUOTA"
---

# Q\_XGETQUOTA(2const)

get quota limits for an XFS filesystem

## NAME

Q\_XGETQUOTA - get quota limits for an XFS filesystem

## LIBRARY

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

## SYNOPSIS

```
#include <xfs/xqm.h>      /* See quotactl(2) */
#include <sys/quota.h>
```

**int quotactl(QCMD(Q\_XGETQUOTA,** *type***), const char \*\_Nullable** *special***,**              **int** *id***, 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\_XGETQUOTA,** *type***),**             **int** *id***, struct fs\_disk\_quota \****addr***);**

## DESCRIPTION

Get disk quota limits and current usage for user *id*.

The *addr* argument is a pointer to an [**fs\_disk\_quota**(2type)](/fs_disk_quota/2type.md) structure.

Unprivileged users may retrieve only their own quotas; a privileged user (**CAP\_SYS\_ADMIN**) may retrieve the quotas of any user.

## 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\_XGETNEXTQUOTA**(2const)](/Q_XGETNEXTQUOTA/2const.md), [**fs\_disk\_quota**(2type)](/fs_disk_quota/2type.md)
