linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
To: <mtk.manpages@gmail.com>, <jack@suse.cz>
Cc: <linux-man@vger.kernel.org>, Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Subject: [PATCH v2] quotactl.2: Add some details about Q_QUOTAON
Date: Fri, 25 Oct 2019 14:06:25 +0800	[thread overview]
Message-ID: <1571983585-8224-1-git-send-email-xuyang2018.jy@cn.fujitsu.com> (raw)
In-Reply-To: <20191024095558.GL31271@quack2.suse.cz>

For Q_QUOTAON, on old kernel we can use quotacheck -ug to
generate quota files. But in current kernel, we can also hide them
in system inodes and indicate them by using "quota" or project feature.

For user or group quota, we can do as below(etc ext4):
mkfs.ext4 -F -o quota /dev/sda5
mount /dev/sda5 /mnt
quotactl(QCMD(Q_QUOTAON, USRQUOTA), /dev/sda5, QFMT_VFS_V0, NULL);

For project quota, we can do as below(etc ext4)
mkfs.ext4 -F -o quota,project /dev/sda5
mount /dev/sda5 /mnt
quotactl(QCMD(Q_QUOTAON, PRJQUOTA), /dev/sda5, QFMT_VFS_V0, NULL);

Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
---
 man2/quotactl.2 | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/man2/quotactl.2 b/man2/quotactl.2
index e0d40a2be..215ec6252 100644
--- a/man2/quotactl.2
+++ b/man2/quotactl.2
@@ -117,7 +117,15 @@ 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
 .BR quotacheck (8)
-program.
+program. 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
+.BR quotacheck (8).
+Quota information is always kept consistent by the filesystem and Q_QUOTAON
+quotactl only enables enforcement of quota limits. The presence of hidden
+system inodes with quota information is indicated by DQF_SYS_FILE flag in
+Q_GETINFO output.
 This operation requires privilege
 .RB ( CAP_SYS_ADMIN ).
 .TP 8
@@ -638,7 +646,8 @@ The
 .I id
 argument is ignored.
 .TP
-.B Q_XQUOTARM
+.B Q_XQUOTARM() " (since Linux 3.16)"
+.\" 9da93f9b7cdf8ab28da6b364cdc1fafc8670b4dc
 Free the disk space taken by disk quotas. The
 .I addr
 argument should be a pointer to an
-- 
2.18.0




  parent reply	other threads:[~2019-10-25  6:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24  8:11 [PATCH] quotactl.2: Add some details about Q_QUOTAON Yang Xu
2019-10-24  9:55 ` Jan Kara
2019-10-24 10:03   ` Yang Xu
2019-10-25  6:06   ` Yang Xu [this message]
2019-10-31  6:04     ` [PATCH v2] " Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1571983585-8224-1-git-send-email-xuyang2018.jy@cn.fujitsu.com \
    --to=xuyang2018.jy@cn.fujitsu.com \
    --cc=jack@suse.cz \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).