From: Sascha Hauer <s.hauer@pengutronix.de>
To: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
Christoph Hellwig <hch@infradead.org>,
kernel@pengutronix.de, Jan Kara <jack@suse.com>,
Richard Weinberger <richard@nod.at>,
Sascha Hauer <s.hauer@pengutronix.de>
Subject: [PATCH] quotactl.2: Add documentation for quotactl_path()
Date: Thu, 4 Mar 2021 13:35:41 +0100 [thread overview]
Message-ID: <20210304123541.30749-4-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20210304123541.30749-1-s.hauer@pengutronix.de>
Expand the quotactl.2 manpage with a description for quotactl_path()
that takes a mountpoint path instead of a path to a block device.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
man2/quotactl.2 | 31 ++++++++++++++++++++++++++++---
man2/quotactl_path.2 | 1 +
2 files changed, 29 insertions(+), 3 deletions(-)
create mode 100644 man2/quotactl_path.2
diff --git a/man2/quotactl.2 b/man2/quotactl.2
index 7869c64ea..76505c668 100644
--- a/man2/quotactl.2
+++ b/man2/quotactl.2
@@ -34,6 +34,8 @@ quotactl \- manipulate disk quotas
.PP
.BI "int quotactl(int " cmd ", const char *" special ", int " id \
", caddr_t " addr );
+.BI "int quotactl_path(int " cmd ", const char *" mountpoint ", int " id \
+", caddr_t " addr );
.fi
.SH DESCRIPTION
The quota system can be used to set per-user, per-group, and per-project limits
@@ -48,7 +50,11 @@ after this, the soft limit counts as a hard limit.
.PP
The
.BR quotactl ()
-call manipulates disk quotas.
+and
+.BR quotactl_path ()
+calls manipulate disk quotas. The difference between both functions is the way
+how the filesystem being manipulated is specified, see description of the arguments
+below.
The
.I cmd
argument indicates a command to be applied to the user or
@@ -75,10 +81,19 @@ value is described below.
.PP
The
.I special
-argument is a pointer to a null-terminated string containing the pathname
+argument to
+.BR quotactl ()
+is a pointer to a null-terminated string containing the pathname
of the (mounted) block special device for the filesystem being manipulated.
.PP
The
+.I mountpoint
+argument to
+.BR quotactl_path ()
+is a pointer to a null-terminated string containing the pathname
+of the mountpoint for the filesystem being manipulated.
+.PP
+The
.I addr
argument is the address of an optional, command-specific, data structure
that is copied in or out of the system.
@@ -133,7 +148,17 @@ flag in the
.I dqi_flags
field returned by the
.B Q_GETINFO
-operation.
+operation. The
+.BR quotactl_path ()
+variant of this syscall generally ignores the
+.IR addr
+and
+.IR id
+arguments, so the
+.B Q_QUOTAON
+operation of
+.BR quotactl_path ()
+is only suitable for work with hidden system inodes.
.IP
This operation requires privilege
.RB ( CAP_SYS_ADMIN ).
diff --git a/man2/quotactl_path.2 b/man2/quotactl_path.2
new file mode 100644
index 000000000..5f63187c6
--- /dev/null
+++ b/man2/quotactl_path.2
@@ -0,0 +1 @@
+.so man2/quotactl.2
--
2.20.1
next prev parent reply other threads:[~2021-03-04 12:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 12:35 [PATCH v3 0/2] quota: Add mountpath based quota support Sascha Hauer
2021-03-04 12:35 ` [PATCH 1/2] " Sascha Hauer
2021-03-04 12:35 ` [PATCH 2/2] quota: wire up quotactl_path Sascha Hauer
2021-03-04 16:41 ` kernel test robot
2021-03-04 17:08 ` kernel test robot
2021-03-04 12:35 ` Sascha Hauer [this message]
2021-03-16 11:29 ` [PATCH v3 0/2] quota: Add mountpath based quota support Jan Kara
2021-03-24 15:43 ` Sascha Hauer
2021-05-12 11:01 ` Jan Kara
2021-05-12 12:53 ` Christian Brauner
2021-05-12 13:14 ` Jan Kara
2021-05-12 15:36 ` Christian Brauner
2021-05-17 12:50 ` Jan Kara
2021-05-12 15:03 ` Sascha Hauer
2021-05-24 8:49 ` Jan Kara
2021-05-25 7:26 ` Sascha Hauer
2021-05-25 8:05 ` Christoph Hellwig
2021-05-25 16:19 ` Jan Kara
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=20210304123541.30749-4-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=hch@infradead.org \
--cc=jack@suse.com \
--cc=kernel@pengutronix.de \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=richard@nod.at \
/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).