Q_QUOTAON(2const)

πŸ“¦
version 6.20 Β· 2 versions
, in arch rolling, nixpkgs unstable

πŸ’– 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 by quota_path exists, but is not a regular file or is not on the filesystem pointed to by special. wrong file, wrong place, not it 😭
  • EBUSY β€” Another Q_QUOTAON had 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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms