* [PATCH 1/2] fchownat.2: add project support updates
@ 2019-03-01 14:06 Wang Shilong
2019-03-01 14:06 ` [PATCH 2/2] statx.2: add project support update Wang Shilong
2019-03-03 23:08 ` [PATCH 1/2] fchownat.2: add project support updates Dave Chinner
0 siblings, 2 replies; 9+ messages in thread
From: Wang Shilong @ 2019-03-01 14:06 UTC (permalink / raw)
To: linux-fsdevel, linux-ext4, linux-xfs, linux-f2fs-devel
Cc: adilger, linux-man, lixi, Wang Shilong
From: Wang Shilong <wshilong@ddn.com>
From: Wang Shilong <wshilong@ddn.com>
Cc: linux-man@vger.kernel.org
Signed-off-by: Wang Shilong <wshilong@ddn.com>
---
man2/chown.2 | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/man2/chown.2 b/man2/chown.2
index 50db789ac..fad74df20 100644
--- a/man2/chown.2
+++ b/man2/chown.2
@@ -217,6 +217,11 @@ instead operate on the link itself, like
.BR fchownat ()
dereferences symbolic links, like
.BR chown ().)
+.TP
+.B AT_FCHOWN_PROJID
+Use
+.I group
+to change file's project ID instead of its group ID.
.PP
See
.BR openat (2)
--
2.19.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] statx.2: add project support update
2019-03-01 14:06 [PATCH 1/2] fchownat.2: add project support updates Wang Shilong
@ 2019-03-01 14:06 ` Wang Shilong
2019-03-01 15:51 ` Darrick J. Wong
2019-03-04 13:52 ` Michael Kerrisk (man-pages)
2019-03-03 23:08 ` [PATCH 1/2] fchownat.2: add project support updates Dave Chinner
1 sibling, 2 replies; 9+ messages in thread
From: Wang Shilong @ 2019-03-01 14:06 UTC (permalink / raw)
To: linux-fsdevel, linux-ext4, linux-xfs, linux-f2fs-devel
Cc: adilger, linux-man, lixi, Wang Shilong
From: Wang Shilong <wshilong@ddn.com>
Cc: linux-man@vger.kernel.org
Signed-off-by: Wang Shilong <wshilong@ddn.com>
---
man2/statx.2 | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/man2/statx.2 b/man2/statx.2
index 7265d8ace..6a9dede8b 100644
--- a/man2/statx.2
+++ b/man2/statx.2
@@ -82,6 +82,7 @@ struct statx {
containing the filesystem where the file resides */
__u32 stx_dev_major; /* Major ID */
__u32 stx_dev_minor; /* Minor ID */
+ __u32 stx_projid; /* Project ID of file */
};
.EE
.in
@@ -261,6 +262,7 @@ STATX_SIZE Want stx_size
STATX_BLOCKS Want stx_blocks
STATX_BASIC_STATS [All of the above]
STATX_BTIME Want stx_btime
+STATX_PROJID Want stx_projid
STATX_ALL [All currently available fields]
.TE
.in
@@ -412,6 +414,9 @@ The device on which this file (inode) resides.
.IR stx_rdev_major " and " stx_rdev_minor
The device that this file (inode) represents if the file is of block or
character device type.
+.TP
+.I stx_projid
+The file's project ID.
.PP
For further information on the above fields, see
.BR inode (7).
@@ -458,6 +463,9 @@ See
.TP
.B STATX_ATTR_ENCRYPTED
A key is required for the file to be encrypted by the filesystem.
+.TP
+.B STATX_ATTR_PROJINHERIT
+Sub directories or files will inherit parent's project ID automatically.
.SH RETURN VALUE
On success, zero is returned.
On error, \-1 is returned, and
--
2.19.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] statx.2: add project support update
2019-03-01 14:06 ` [PATCH 2/2] statx.2: add project support update Wang Shilong
@ 2019-03-01 15:51 ` Darrick J. Wong
2019-03-04 13:52 ` Michael Kerrisk (man-pages)
1 sibling, 0 replies; 9+ messages in thread
From: Darrick J. Wong @ 2019-03-01 15:51 UTC (permalink / raw)
To: Wang Shilong
Cc: adilger, linux-man, Wang Shilong, lixi, linux-f2fs-devel,
linux-xfs, linux-fsdevel, linux-ext4
On Fri, Mar 01, 2019 at 11:06:24PM +0900, Wang Shilong wrote:
> From: Wang Shilong <wshilong@ddn.com>
>
> Cc: linux-man@vger.kernel.org
> Signed-off-by: Wang Shilong <wshilong@ddn.com>
> ---
> man2/statx.2 | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/man2/statx.2 b/man2/statx.2
> index 7265d8ace..6a9dede8b 100644
> --- a/man2/statx.2
> +++ b/man2/statx.2
> @@ -82,6 +82,7 @@ struct statx {
> containing the filesystem where the file resides */
> __u32 stx_dev_major; /* Major ID */
> __u32 stx_dev_minor; /* Minor ID */
> + __u32 stx_projid; /* Project ID of file */
> };
> .EE
> .in
> @@ -261,6 +262,7 @@ STATX_SIZE Want stx_size
> STATX_BLOCKS Want stx_blocks
> STATX_BASIC_STATS [All of the above]
> STATX_BTIME Want stx_btime
> +STATX_PROJID Want stx_projid
> STATX_ALL [All currently available fields]
> .TE
> .in
> @@ -412,6 +414,9 @@ The device on which this file (inode) resides.
> .IR stx_rdev_major " and " stx_rdev_minor
> The device that this file (inode) represents if the file is of block or
> character device type.
> +.TP
> +.I stx_projid
> +The file's project ID.
> .PP
> For further information on the above fields, see
> .BR inode (7).
> @@ -458,6 +463,9 @@ See
> .TP
> .B STATX_ATTR_ENCRYPTED
> A key is required for the file to be encrypted by the filesystem.
> +.TP
> +.B STATX_ATTR_PROJINHERIT
> +Sub directories or files will inherit parent's project ID automatically.
"Newly created files and directories will inherit...", I think?
I appreciate the manpage and fstests updates immensely. :)
--D
> .SH RETURN VALUE
> On success, zero is returned.
> On error, \-1 is returned, and
> --
> 2.19.1
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] fchownat.2: add project support updates
2019-03-01 14:06 [PATCH 1/2] fchownat.2: add project support updates Wang Shilong
2019-03-01 14:06 ` [PATCH 2/2] statx.2: add project support update Wang Shilong
@ 2019-03-03 23:08 ` Dave Chinner
1 sibling, 0 replies; 9+ messages in thread
From: Dave Chinner @ 2019-03-03 23:08 UTC (permalink / raw)
To: Wang Shilong
Cc: adilger, linux-man, Wang Shilong, lixi, linux-f2fs-devel,
linux-xfs, linux-fsdevel, linux-ext4
On Fri, Mar 01, 2019 at 11:06:22PM +0900, Wang Shilong wrote:
> From: Wang Shilong <wshilong@ddn.com>
>
> From: Wang Shilong <wshilong@ddn.com>
>
> Cc: linux-man@vger.kernel.org
> Signed-off-by: Wang Shilong <wshilong@ddn.com>
> ---
> man2/chown.2 | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/man2/chown.2 b/man2/chown.2
> index 50db789ac..fad74df20 100644
> --- a/man2/chown.2
> +++ b/man2/chown.2
> @@ -217,6 +217,11 @@ instead operate on the link itself, like
> .BR fchownat ()
> dereferences symbolic links, like
> .BR chown ().)
> +.TP
> +.B AT_FCHOWN_PROJID
> +Use
> +.I group
> +to change file's project ID instead of its group ID.
Needs to document init_user_ns constraint.
> .PP
> See
> .BR openat (2)
Also missing new ENOSPC error that attempting to change a project ID
can result in. Also should document the EPERM error condition when
changing project ID in wrong userns, and EINVAL if an invalid
project ID is supplied.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] statx.2: add project support update
2019-03-01 14:06 ` [PATCH 2/2] statx.2: add project support update Wang Shilong
2019-03-01 15:51 ` Darrick J. Wong
@ 2019-03-04 13:52 ` Michael Kerrisk (man-pages)
2019-03-04 20:50 ` Dave Chinner
1 sibling, 1 reply; 9+ messages in thread
From: Michael Kerrisk (man-pages) @ 2019-03-04 13:52 UTC (permalink / raw)
To: Wang Shilong
Cc: Andreas Dilger, linux-man, Wang Shilong, Darrick J. Wong, lixi,
linux-f2fs-devel, xfs, linux-fsdevel, Ext4 Developers List
Hello Wang Shilong,
On Fri, 1 Mar 2019 at 15:06, Wang Shilong <wangshilong1991@gmail.com> wrote:
>
> From: Wang Shilong <wshilong@ddn.com>
I take it that these patches relate to some API changes that are not
yet merged into the kernel, right?
Also, I think we need some accompanying info to describe project IDs.
Can you point me at any documents/resources?
Thanks,
Michael
>
> Cc: linux-man@vger.kernel.org
> Signed-off-by: Wang Shilong <wshilong@ddn.com>
> ---
> man2/statx.2 | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/man2/statx.2 b/man2/statx.2
> index 7265d8ace..6a9dede8b 100644
> --- a/man2/statx.2
> +++ b/man2/statx.2
> @@ -82,6 +82,7 @@ struct statx {
> containing the filesystem where the file resides */
> __u32 stx_dev_major; /* Major ID */
> __u32 stx_dev_minor; /* Minor ID */
> + __u32 stx_projid; /* Project ID of file */
> };
> .EE
> .in
> @@ -261,6 +262,7 @@ STATX_SIZE Want stx_size
> STATX_BLOCKS Want stx_blocks
> STATX_BASIC_STATS [All of the above]
> STATX_BTIME Want stx_btime
> +STATX_PROJID Want stx_projid
> STATX_ALL [All currently available fields]
> .TE
> .in
> @@ -412,6 +414,9 @@ The device on which this file (inode) resides.
> .IR stx_rdev_major " and " stx_rdev_minor
> The device that this file (inode) represents if the file is of block or
> character device type.
> +.TP
> +.I stx_projid
> +The file's project ID.
> .PP
> For further information on the above fields, see
> .BR inode (7).
> @@ -458,6 +463,9 @@ See
> .TP
> .B STATX_ATTR_ENCRYPTED
> A key is required for the file to be encrypted by the filesystem.
> +.TP
> +.B STATX_ATTR_PROJINHERIT
> +Sub directories or files will inherit parent's project ID automatically.
> .SH RETURN VALUE
> On success, zero is returned.
> On error, \-1 is returned, and
> --
> 2.19.1
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] statx.2: add project support update
2019-03-04 13:52 ` Michael Kerrisk (man-pages)
@ 2019-03-04 20:50 ` Dave Chinner
2019-03-04 21:16 ` Michael Kerrisk (man-pages)
2019-03-04 22:56 ` Eugene Syromyatnikov
0 siblings, 2 replies; 9+ messages in thread
From: Dave Chinner @ 2019-03-04 20:50 UTC (permalink / raw)
To: Michael Kerrisk (man-pages)
Cc: Andreas Dilger, linux-man, Wang Shilong, Darrick J. Wong, lixi,
Wang Shilong, linux-f2fs-devel, xfs, linux-fsdevel,
Ext4 Developers List
On Mon, Mar 04, 2019 at 02:52:59PM +0100, Michael Kerrisk (man-pages) wrote:
> Hello Wang Shilong,
>
> On Fri, 1 Mar 2019 at 15:06, Wang Shilong <wangshilong1991@gmail.com> wrote:
> >
> > From: Wang Shilong <wshilong@ddn.com>
>
> I take it that these patches relate to some API changes that are not
> yet merged into the kernel, right?
>
> Also, I think we need some accompanying info to describe project IDs.
> Can you point me at any documents/resources?
Probably "best" documented in the man pages that ship with xfsprogs.
Basically, it's just another quota ID that can be used to account
for files/directories in arbitrary admin defined groups. i.e. quotas
that aren't bound by user/group identities.
$ man 8 xfs_quota
$ man 5 projects
$ man 5 projid
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] statx.2: add project support update
2019-03-04 20:50 ` Dave Chinner
@ 2019-03-04 21:16 ` Michael Kerrisk (man-pages)
2019-03-04 23:17 ` Dave Chinner
2019-03-04 22:56 ` Eugene Syromyatnikov
1 sibling, 1 reply; 9+ messages in thread
From: Michael Kerrisk (man-pages) @ 2019-03-04 21:16 UTC (permalink / raw)
To: Dave Chinner
Cc: Andreas Dilger, linux-man, Wang Shilong, Darrick J. Wong, lixi,
Wang Shilong, linux-f2fs-devel, xfs, linux-fsdevel,
Ext4 Developers List
Hi Dave,
On Mon, 4 Mar 2019 at 21:50, Dave Chinner <david@fromorbit.com> wrote:
>
> On Mon, Mar 04, 2019 at 02:52:59PM +0100, Michael Kerrisk (man-pages) wrote:
> > Hello Wang Shilong,
> >
> > On Fri, 1 Mar 2019 at 15:06, Wang Shilong <wangshilong1991@gmail.com> wrote:
> > >
> > > From: Wang Shilong <wshilong@ddn.com>
> >
> > I take it that these patches relate to some API changes that are not
> > yet merged into the kernel, right?
> >
> > Also, I think we need some accompanying info to describe project IDs.
> > Can you point me at any documents/resources?
>
> Probably "best" documented in the man pages that ship with xfsprogs.
But, these IDs are a kernel construct, right? Is their scope limited
just to XFS, or do other filesystems have the concept also?
Cheers,
Michael
> Basically, it's just another quota ID that can be used to account
> for files/directories in arbitrary admin defined groups. i.e. quotas
> that aren't bound by user/group identities.
>
> $ man 8 xfs_quota
> $ man 5 projects
> $ man 5 projid
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] statx.2: add project support update
2019-03-04 20:50 ` Dave Chinner
2019-03-04 21:16 ` Michael Kerrisk (man-pages)
@ 2019-03-04 22:56 ` Eugene Syromyatnikov
1 sibling, 0 replies; 9+ messages in thread
From: Eugene Syromyatnikov @ 2019-03-04 22:56 UTC (permalink / raw)
To: Dave Chinner
Cc: Andreas Dilger, linux-man, Wang Shilong, Darrick J. Wong, lixi,
Wang Shilong, linux-f2fs-devel, xfs, Michael Kerrisk (man-pages),
linux-fsdevel, Ext4 Developers List
On Mon, Mar 4, 2019 at 9:57 PM Dave Chinner <david@fromorbit.com> wrote:
>
> On Mon, Mar 04, 2019 at 02:52:59PM +0100, Michael Kerrisk (man-pages) wrote:
> > Hello Wang Shilong,
> >
> > On Fri, 1 Mar 2019 at 15:06, Wang Shilong <wangshilong1991@gmail.com> wrote:
> > >
> > > From: Wang Shilong <wshilong@ddn.com>
> >
> > I take it that these patches relate to some API changes that are not
> > yet merged into the kernel, right?
> >
> > Also, I think we need some accompanying info to describe project IDs.
> > Can you point me at any documents/resources?
>
> Probably "best" documented in the man pages that ship with xfsprogs.
> Basically, it's just another quota ID that can be used to account
> for files/directories in arbitrary admin defined groups. i.e. quotas
> that aren't bound by user/group identities.
>
> $ man 8 xfs_quota
> $ man 5 projects
> $ man 5 projid
Project quotas also mentioned in quotactl(2).
--
Eugene Syromyatnikov
mailto:evgsyr@gmail.com
xmpp:esyr@jabber.{ru|org}
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] statx.2: add project support update
2019-03-04 21:16 ` Michael Kerrisk (man-pages)
@ 2019-03-04 23:17 ` Dave Chinner
0 siblings, 0 replies; 9+ messages in thread
From: Dave Chinner @ 2019-03-04 23:17 UTC (permalink / raw)
To: Michael Kerrisk (man-pages)
Cc: Andreas Dilger, linux-man, Wang Shilong, Darrick J. Wong, lixi,
Wang Shilong, linux-f2fs-devel, xfs, linux-fsdevel,
Ext4 Developers List
On Mon, Mar 04, 2019 at 10:16:29PM +0100, Michael Kerrisk (man-pages) wrote:
> Hi Dave,
> On Mon, 4 Mar 2019 at 21:50, Dave Chinner <david@fromorbit.com> wrote:
> >
> > On Mon, Mar 04, 2019 at 02:52:59PM +0100, Michael Kerrisk (man-pages) wrote:
> > > Hello Wang Shilong,
> > >
> > > On Fri, 1 Mar 2019 at 15:06, Wang Shilong <wangshilong1991@gmail.com> wrote:
> > > >
> > > > From: Wang Shilong <wshilong@ddn.com>
> > >
> > > I take it that these patches relate to some API changes that are not
> > > yet merged into the kernel, right?
> > >
> > > Also, I think we need some accompanying info to describe project IDs.
> > > Can you point me at any documents/resources?
> >
> > Probably "best" documented in the man pages that ship with xfsprogs.
>
> But, these IDs are a kernel construct, right?
On disk filesystem format construct, actually. The kernel doesn't
use them for anything other than filesystem quota accounting - it's
completely oblivious to the meaning of the IDs (unlike uids and gids
used for user and group quota accounting).
> Is their scope limited
> just to XFS, or do other filesystems have the concept also?
Originally only XFS. Irix implemented project quotas rather than
group quotas, IIRC, in the late 80s/early 90s(*) so XFS supported
project quotas for day zero. I think is was 2004/2005 that they were
fully supported on Linux (using an exclusive group or project
quota requirement) and with v5 filesystems we added a third quota
inode so we can have user, group and project quotas all active on a
filesystem at once.
2-3 years ago project quotas were added to ext4 and so anything that
uses the generic kernel quota infrastructure can implement it, too.
Cheers,
Dave.
(*) In some ways, we are still dragging Linux into the '80s, kicking
and screaming all the way :P
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-03-04 23:17 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-01 14:06 [PATCH 1/2] fchownat.2: add project support updates Wang Shilong
2019-03-01 14:06 ` [PATCH 2/2] statx.2: add project support update Wang Shilong
2019-03-01 15:51 ` Darrick J. Wong
2019-03-04 13:52 ` Michael Kerrisk (man-pages)
2019-03-04 20:50 ` Dave Chinner
2019-03-04 21:16 ` Michael Kerrisk (man-pages)
2019-03-04 23:17 ` Dave Chinner
2019-03-04 22:56 ` Eugene Syromyatnikov
2019-03-03 23:08 ` [PATCH 1/2] fchownat.2: add project support updates Dave Chinner
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).