Q_QUOTAON(2const)
π Q_QUOTAON(2const) β turn on quotas for a filesystem π
okay bestie, gather round, because this is the Q_QUOTAON operation from the Linux man-pages (that's the 2const page, iykyk) and it is literally the "go go go" button for filesystem quotas. no cap. let's get into it π
β¨ LIBRARY β¨
Standard C library (libc, -lc). yes queen, the plain one π«Ά
πΈ SYNOPSIS πΈ
#include <sys/quota.h>
int quotactl(QCMD(Q_QUOTAON, type), const char *_Nullable special,
int fmt, caddr_t quota_path);
#include <sys/quota.h> /* Definition of Q_* constants */
#include <sys/syscall.h> /* Definition of SYS_* constants */
#include <unistd.h>
int syscall(SYS_quotactl_fd, int fd, QCMD(Q_QUOTAON, type));
two whole vibes to choose from: the classic quotactl() and the newer quotactl_fd() one. pick your fighter π
π¦ DESCRIPTION π¦
So what are we even doing here? We're turning on quotas for a filesystem!! That's the whole thing. It's giving "enforcement mode: ACTIVATED" β¨
The fmt argument is the identification number of the quota format to be used. Currently, there are three supported quota formats, and yes we're listing all three because we don't gatekeep:
QFMT_VFS_OLDβ the original quota format. the OG, the blueprint, the ancestor πQFMT_VFS_V0β the standard VFS v0 quota format, which can handle 32-bit UIDs and GIDs and quota limits up to 2^42 bytes and 2^32 inodes. solid, reliable, does the job πQFMT_VFS_V1β a quota format that can handle 32-bit UIDs and GIDs and quota limits of 2^63 - 1 bytes and 2^63 - 1 inodes. big numbers, main character energy π
The quota_path argument points to the pathname of a file containing the quotas for the filesystem. The quota file must exist β it is normally created with the quotacheck(8) program. so like, do that first, bestie, don't come at it empty-handed π
Quota information can be also stored in hidden system inodes for ext4, XFS, and other filesystems if the filesystem is configured so. In this case, there are no visible quota files and there is no need to use quotacheck(8). Quota information is always kept consistent by the filesystem and the Q_QUOTAON operation serves only to enable enforcement of quota limits. The presence of hidden system inodes with quota information is indicated by the DQF_SYS_FILE flag in the dqi_flags field returned by the Q_GETINFO(2const) operation. sneaky little inodes, we love them π§
The quotactl_fd() variant of this system call doesn't have the quota_path and fmt arguments, so the Q_QUOTAON operation of quotactl_fd() is only suitable for work with hidden system inodes. it's the minimalist version, honestly π
This operation requires privilege (CAP_SYS_ADMIN). so if it's not working, that's probably why, babes. check ur caps π
π RETURN VALUE π
See quotactl(2). (go read that one, it's the parent page fr fr)
π ERRORS π
See quotactl(2). Plus these lil guys, specifically for us:
EACCESβ The quota file pointed to byquota_pathexists, but is not a regular file or is not on the filesystem pointed to byspecial. wrong file, wrong place, not it πEBUSYβ AnotherQ_QUOTAONhad already been performed. bestie it's already ON, you can't turn it on twice πEINVALβ The specified quota file is corrupted. the file is broken, tragic, rip π«ΆESRCHβ The specified quota format was not found. that format? doesn't exist. nowhere. gone π
β STANDARDS β
Linux. that's it. that's the standard π
π HISTORY π
Linux. history is also just... Linux. iconic behaviour β
π₯ SEE ALSO π₯
and that's the whole page, no notes β¨ this was pulled straight from Linux man-pages 6.20, dated 2026-06-05 β go turn on those quotas bestie, you got this πππ¦
π¦ 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
- Copyright 1996, Andries E. Brouwer <aeb@cwi.nl>
- Copyright 2010, Jan Kara <jack@suse.cz>
- Copyright 2010, Michael Kerrisk <mtk.manpages@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms