From: "Darrick J. Wong" <djwong@kernel.org>
To: John Garry <john.g.garry@oracle.com>
Cc: alx@kernel.org, linux-man@vger.kernel.org,
linux-fsdevel@vger.kernel.org, axboe@kernel.dk, hch@lst.de,
dchinner@redhat.com, martin.petersen@oracle.com,
Himanshu Madhani <himanshu.madhani@oracle.com>
Subject: Re: [PATCH v4 1/3] statx.2: Document STATX_WRITE_ATOMIC
Date: Wed, 17 Jul 2024 14:36:14 -0700 [thread overview]
Message-ID: <20240717213614.GH1998502@frogsfrogsfrogs> (raw)
In-Reply-To: <20240717093619.3148729-2-john.g.garry@oracle.com>
On Wed, Jul 17, 2024 at 09:36:17AM +0000, John Garry wrote:
> From: Himanshu Madhani <himanshu.madhani@oracle.com>
>
> Add the text to the statx man page.
>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@oracle.com>
> Signed-off-by: John Garry <john.g.garry@oracle.com>
> ---
> man/man2/statx.2 | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/man/man2/statx.2 b/man/man2/statx.2
> index 3d47319c6..a7cdc0097 100644
> --- a/man/man2/statx.2
> +++ b/man/man2/statx.2
> @@ -70,6 +70,11 @@ struct statx {
> __u32 stx_dio_offset_align;
> \&
> __u64 stx_subvol; /* Subvolume identifier */
> +\&
> + /* Direct I/O atomic write limits */
> + __u32 stx_atomic_write_unit_min;
> + __u32 stx_atomic_write_unit_max;
> + __u32 stx_atomic_write_segments_max;
> };
> .EE
> .in
> @@ -259,6 +264,9 @@ STATX_DIOALIGN Want stx_dio_mem_align and stx_dio_offset_align
> STATX_MNT_ID_UNIQUE Want unique stx_mnt_id (since Linux 6.8)
> STATX_SUBVOL Want stx_subvol
> (since Linux 6.10; support varies by filesystem)
> +STATX_WRITE_ATOMIC Want stx_atomic_write_unit_min, stx_atomic_write_unit_max,
> + and stx_atomic_write_segments_max.
> + (since Linux 6.11; support varies by filesystem)
Congratulations ^^^^^^^^^ on getting this merged!
> .TE
> .in
> .P
> @@ -463,6 +471,22 @@ 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.
> +.TP
> +.I stx_atomic_write_unit_min
> +.TQ
> +.I stx_atomic_write_unit_max
> +The minimum and maximum sizes (in bytes) supported for direct I/O
> +.RB ( O_DIRECT )
> +on the file to be written with torn-write protection.
I'm tempted to be nitpicky and say "...supported for direct I/O writes
to the the file to have torn-write protection" but... eh. It's hot out
and I'm not that fussed if you want to ignore that.
Either way,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> +These values are each guaranteed to be a power-of-2.
> +.TP
> +.I stx_atomic_write_segments_max
> +The maximum number of elements in an array of vectors for a write with
> +torn-write protection enabled.
> +See
> +.BR RWF_ATOMIC
> +flag for
> +.BR pwritev2 (2).
> .P
> For further information on the above fields, see
> .BR inode (7).
> @@ -516,6 +540,9 @@ It cannot be written to, and all reads from it will be verified
> against a cryptographic hash that covers the
> entire file (e.g., via a Merkle tree).
> .TP
> +.BR STATX_ATTR_WRITE_ATOMIC " (since Linux 6.11)"
> +The file supports torn-write protection.
> +.TP
> .BR STATX_ATTR_DAX " (since Linux 5.8)"
> The file is in the DAX (cpu direct access) state.
> DAX state attempts to
> --
> 2.31.1
>
next prev parent reply other threads:[~2024-07-17 21:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-17 9:36 [PATCH v4 0/3] man2: Document RWF_ATOMIC John Garry
2024-07-17 9:36 ` [PATCH v4 1/3] statx.2: Document STATX_WRITE_ATOMIC John Garry
2024-07-17 21:36 ` Darrick J. Wong [this message]
2024-07-17 9:36 ` [PATCH v4 2/3] readv.2: Document RWF_ATOMIC flag John Garry
2024-07-17 21:44 ` Darrick J. Wong
2024-07-18 14:07 ` John Garry
2024-07-18 15:05 ` Darrick J. Wong
2024-07-17 9:36 ` [PATCH v4 3/3] io_submit.2: Document RWF_ATOMIC John Garry
2024-07-17 21:44 ` Darrick J. Wong
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=20240717213614.GH1998502@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=alx@kernel.org \
--cc=axboe@kernel.dk \
--cc=dchinner@redhat.com \
--cc=hch@lst.de \
--cc=himanshu.madhani@oracle.com \
--cc=john.g.garry@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=martin.petersen@oracle.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).