diff mbox series

[v2] statx.2: Document STATX_SUBVOL

Message ID 20240620130017.2686511-1-john.g.garry@oracle.com (mailing list archive)
State New
Headers show
Series [v2] statx.2: Document STATX_SUBVOL | expand

Commit Message

John Garry June 20, 2024, 1 p.m. UTC
From: Kent Overstreet <kent.overstreet@linux.dev>

Document the new statx.stx_subvol field.

This would be clearer if we had a proper API for walking subvolumes that
we could refer to, but that's still coming.

Link: https://lore.kernel.org/linux-fsdevel/20240308022914.196982-1-kent.overstreet@linux.dev/
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
[jpg: mention supported FSes and formatting improvements]
Signed-off-by: John Garry <john.g.garry@oracle.com>
---
I am just sending a new version as I want to post more statx updates
which are newer than stx_subvol.

Comments

John Garry June 27, 2024, 12:05 p.m. UTC | #1
On 20/06/2024 14:00, John Garry wrote:

Hi Alex,

Is there anything else required to get this picked up?

I have some more dependent changes waiting.

Thanks

> From: Kent Overstreet <kent.overstreet@linux.dev>
> 
> Document the new statx.stx_subvol field.
> 
> This would be clearer if we had a proper API for walking subvolumes that
> we could refer to, but that's still coming.
> 
> Link: https://lore.kernel.org/linux-fsdevel/20240308022914.196982-1-kent.overstreet@linux.dev/
> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
> [jpg: mention supported FSes and formatting improvements]
> Signed-off-by: John Garry <john.g.garry@oracle.com>
> ---
> I am just sending a new version as I want to post more statx updates
> which are newer than stx_subvol.
> diff --git a/man/man2/statx.2 b/man/man2/statx.2
> index 0dcf7e20b..5b17d9afe 100644
> --- a/man/man2/statx.2
> +++ b/man/man2/statx.2
> @@ -68,6 +68,8 @@ struct statx {
>       /* Direct I/O alignment restrictions */
>       __u32 stx_dio_mem_align;
>       __u32 stx_dio_offset_align;
> +\&
> +    __u64 stx_subvol;      /* Subvolume identifier */
>   };
>   .EE
>   .in
> @@ -255,6 +257,8 @@ STATX_ALL	The same as STATX_BASIC_STATS | STATX_BTIME.
>   STATX_MNT_ID	Want stx_mnt_id (since Linux 5.8)
>   STATX_DIOALIGN	Want stx_dio_mem_align and stx_dio_offset_align
>   	(since Linux 6.1; support varies by filesystem)
> +STATX_SUBVOL	Want stx_subvol
> +	(since Linux 6.10; support varies by filesystem)
>   .TE
>   .in
>   .P
> @@ -439,6 +443,14 @@ or 0 if direct I/O is not supported on this file.
>   This will only be nonzero if
>   .I stx_dio_mem_align
>   is nonzero, and vice versa.
> +.TP
> +.I stx_subvol
> +Subvolume number of the current file.
> +.IP
> +Subvolumes are fancy directories,
> +i.e. they form a tree structure that may be walked recursively.
> +Support varies by filesystem;
> +it is supported by bcachefs and btrfs since Linux 6.10.
>   .P
>   For further information on the above fields, see
>   .BR inode (7).
Alejandro Colomar June 27, 2024, 12:55 p.m. UTC | #2
On Thu, Jun 27, 2024 at 01:05:38PM GMT, John Garry wrote:
> On 20/06/2024 14:00, John Garry wrote:

Hi John,

> Hi Alex,
> 
> Is there anything else required to get this picked up?
> 
> I have some more dependent changes waiting.

No; I'll try to review it tonight or tomorrow.  Thanks for the ping!
I'm doing many things these days, and forgot about this patch.

Have a lovely day!
Alex

> 
> Thanks
> 
> > From: Kent Overstreet <kent.overstreet@linux.dev>
> > 
> > Document the new statx.stx_subvol field.
> > 
> > This would be clearer if we had a proper API for walking subvolumes that
> > we could refer to, but that's still coming.
> > 
> > Link: https://lore.kernel.org/linux-fsdevel/20240308022914.196982-1-kent.overstreet@linux.dev/
> > Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
> > [jpg: mention supported FSes and formatting improvements]
> > Signed-off-by: John Garry <john.g.garry@oracle.com>
> > ---
> > I am just sending a new version as I want to post more statx updates
> > which are newer than stx_subvol.
> > diff --git a/man/man2/statx.2 b/man/man2/statx.2
> > index 0dcf7e20b..5b17d9afe 100644
> > --- a/man/man2/statx.2
> > +++ b/man/man2/statx.2
> > @@ -68,6 +68,8 @@ struct statx {
> >       /* Direct I/O alignment restrictions */
> >       __u32 stx_dio_mem_align;
> >       __u32 stx_dio_offset_align;
> > +\&
> > +    __u64 stx_subvol;      /* Subvolume identifier */
> >   };
> >   .EE
> >   .in
> > @@ -255,6 +257,8 @@ STATX_ALL	The same as STATX_BASIC_STATS | STATX_BTIME.
> >   STATX_MNT_ID	Want stx_mnt_id (since Linux 5.8)
> >   STATX_DIOALIGN	Want stx_dio_mem_align and stx_dio_offset_align
> >   	(since Linux 6.1; support varies by filesystem)
> > +STATX_SUBVOL	Want stx_subvol
> > +	(since Linux 6.10; support varies by filesystem)
> >   .TE
> >   .in
> >   .P
> > @@ -439,6 +443,14 @@ or 0 if direct I/O is not supported on this file.
> >   This will only be nonzero if
> >   .I stx_dio_mem_align
> >   is nonzero, and vice versa.
> > +.TP
> > +.I stx_subvol
> > +Subvolume number of the current file.
> > +.IP
> > +Subvolumes are fancy directories,
> > +i.e. they form a tree structure that may be walked recursively.
> > +Support varies by filesystem;
> > +it is supported by bcachefs and btrfs since Linux 6.10.
> >   .P
> >   For further information on the above fields, see
> >   .BR inode (7).
>
Alejandro Colomar June 28, 2024, 11:31 a.m. UTC | #3
Hi Kent, John,

On Thu, Jun 20, 2024 at 01:00:17PM GMT, John Garry wrote:
> From: Kent Overstreet <kent.overstreet@linux.dev>
> 
> Document the new statx.stx_subvol field.
> 
> This would be clearer if we had a proper API for walking subvolumes that
> we could refer to, but that's still coming.
> 
> Link: https://lore.kernel.org/linux-fsdevel/20240308022914.196982-1-kent.overstreet@linux.dev/
> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
> [jpg: mention supported FSes and formatting improvements]
> Signed-off-by: John Garry <john.g.garry@oracle.com>

Patch applied.  Thanks!

Have a lovely day!
Alex

> ---
> I am just sending a new version as I want to post more statx updates
> which are newer than stx_subvol.
> diff --git a/man/man2/statx.2 b/man/man2/statx.2
> index 0dcf7e20b..5b17d9afe 100644
> --- a/man/man2/statx.2
> +++ b/man/man2/statx.2
> @@ -68,6 +68,8 @@ struct statx {
>      /* Direct I/O alignment restrictions */
>      __u32 stx_dio_mem_align;
>      __u32 stx_dio_offset_align;
> +\&
> +    __u64 stx_subvol;      /* Subvolume identifier */
>  };
>  .EE
>  .in
> @@ -255,6 +257,8 @@ STATX_ALL	The same as STATX_BASIC_STATS | STATX_BTIME.
>  STATX_MNT_ID	Want stx_mnt_id (since Linux 5.8)
>  STATX_DIOALIGN	Want stx_dio_mem_align and stx_dio_offset_align
>  	(since Linux 6.1; support varies by filesystem)
> +STATX_SUBVOL	Want stx_subvol
> +	(since Linux 6.10; support varies by filesystem)
>  .TE
>  .in
>  .P
> @@ -439,6 +443,14 @@ or 0 if direct I/O is not supported on this file.
>  This will only be nonzero if
>  .I stx_dio_mem_align
>  is nonzero, and vice versa.
> +.TP
> +.I stx_subvol
> +Subvolume number of the current file.
> +.IP
> +Subvolumes are fancy directories,
> +i.e. they form a tree structure that may be walked recursively.
> +Support varies by filesystem;
> +it is supported by bcachefs and btrfs since Linux 6.10.
>  .P
>  For further information on the above fields, see
>  .BR inode (7).
> -- 
> 2.31.1
>
diff mbox series

Patch

diff --git a/man/man2/statx.2 b/man/man2/statx.2
index 0dcf7e20b..5b17d9afe 100644
--- a/man/man2/statx.2
+++ b/man/man2/statx.2
@@ -68,6 +68,8 @@  struct statx {
     /* Direct I/O alignment restrictions */
     __u32 stx_dio_mem_align;
     __u32 stx_dio_offset_align;
+\&
+    __u64 stx_subvol;      /* Subvolume identifier */
 };
 .EE
 .in
@@ -255,6 +257,8 @@  STATX_ALL	The same as STATX_BASIC_STATS | STATX_BTIME.
 STATX_MNT_ID	Want stx_mnt_id (since Linux 5.8)
 STATX_DIOALIGN	Want stx_dio_mem_align and stx_dio_offset_align
 	(since Linux 6.1; support varies by filesystem)
+STATX_SUBVOL	Want stx_subvol
+	(since Linux 6.10; support varies by filesystem)
 .TE
 .in
 .P
@@ -439,6 +443,14 @@  or 0 if direct I/O is not supported on this file.
 This will only be nonzero if
 .I stx_dio_mem_align
 is nonzero, and vice versa.
+.TP
+.I stx_subvol
+Subvolume number of the current file.
+.IP
+Subvolumes are fancy directories,
+i.e. they form a tree structure that may be walked recursively.
+Support varies by filesystem;
+it is supported by bcachefs and btrfs since Linux 6.10.
 .P
 For further information on the above fields, see
 .BR inode (7).