---
name: "Q_XQUOTAON"
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_XQUOTAON"
---

# Q\_XQUOTAON(2const)

turn on quotas for an XFS filesystem

## NAME

Q\_XQUOTAON - turn on quotas 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\_XQUOTAON,** *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\_XQUOTAON,** *type***), 0,**             **unsigned int \****addr***);**

## DESCRIPTION

Turn on quotas for an XFS filesystem.

XFS provides the ability to turn on/off quota limit enforcement with quota accounting. Therefore, XFS expects *addr* to be a pointer to an *unsigned int* that contains a bitwise combination of the following flags (defined in *\<xfs/xqm.h\>*):

```
XFS_QUOTA_UDQ_ACCT  /* User quota accounting */
XFS_QUOTA_UDQ_ENFD  /* User quota limits enforcement */
XFS_QUOTA_GDQ_ACCT  /* Group quota accounting */
XFS_QUOTA_GDQ_ENFD  /* Group quota limits enforcement */
XFS_QUOTA_PDQ_ACCT  /* Project quota accounting */
XFS_QUOTA_PDQ_ENFD  /* Project quota limits enforcement */
```

This operation requires privilege (**CAP\_SYS\_ADMIN**).

## 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\_XQUOTAOFF**(2const)](/Q_XQUOTAOFF/2const.md)
