[PATCH 08/13] linux: Add STATX_WRITE_ATOMIC/STATX_ATTR_WRITE_ATOMIC definitions to generic statx
Carlos O'Donell
carlos@redhat.com
Tue Nov 4 16:58:23 GMT 2025
On 10/3/25 3:38 PM, Adhemerval Zanella wrote:
> The commit fc650bfd71081d26c1015d299827fb58a23a6b02 added
> STATX_WRITE_ATOMIC/STATX_ATTR_WRITE_ATOMIC on the statx-generic.h
> without updating the generic statx struct.
This is strictly a 6.13 update... but why not go up to 6.17?
LGTM for 6.13 explicitly.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
> ---
> io/bits/types/struct_statx.h | 6 +++++-
> io/tst-statx.c | 3 ++-
> 2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/io/bits/types/struct_statx.h b/io/bits/types/struct_statx.h
> index f91633159c..e8d492df77 100644
> --- a/io/bits/types/struct_statx.h
> +++ b/io/bits/types/struct_statx.h
> @@ -53,7 +53,11 @@ struct statx
> __uint32_t stx_dio_mem_align;
> __uint32_t stx_dio_offset_align;;
> __uint64_t stx_subvol;
> - __uint64_t __statx_pad2[11];
OK. Remove 4x 32-bit padding (11->9).
> + __uint32_t stx_atomic_write_unit_min;
OK. Matches.
> + __uint32_t stx_atomic_write_unit_max;
OK. Matches.
> + __uint32_t stx_atomic_write_segments_max;
OK. Matches. Is at 0xb0.
> + __uint32_t __statx_pad2;
OK. Starts at 0xb4.
> + __uint64_t __statx_pad3[9];
OK. Starts at 0xb8.
Missing stx_dio_read_offset_align? Commit 7ed6cbe0f8caa.
Missing stx_atomic_write_unit_max_opt? Commit 5d894321c49e6
Missing __spare2[1]?
Would leave __statx_pad3 at 8.
> };
>
> #endif /* __statx_defined */
> diff --git a/io/tst-statx.c b/io/tst-statx.c
> index c7a5707c7a..d691d157e0 100644
> --- a/io/tst-statx.c
> +++ b/io/tst-statx.c
> @@ -37,7 +37,8 @@ _Static_assert (offsetof (struct statx, stx_nlink) == 16, "statx nlink");
> _Static_assert (offsetof (struct statx, stx_ino) == 32, "statx ino");
> _Static_assert (offsetof (struct statx, stx_atime) == 64, "statx atime");
> _Static_assert (offsetof (struct statx, stx_rdev_major) == 128, "statx rdev");
> -_Static_assert (offsetof (struct statx, __statx_pad2) == 168, "statx pad2");
> +_Static_assert (offsetof (struct statx, __statx_pad2) == 0xb4, "statx pad2");
> +_Static_assert (offsetof (struct statx, __statx_pad3) == 0xb8, "statx pad3");
OK. Though this would change with an update.
>
> #include "statx_generic.c"
>
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list