Skip to content

Conversation

@Thomasdezeeuw
Copy link
Contributor

Description

Updates statx to include all fields as of Linux v6.16.

Sources

https://github.com/torvalds/linux/blob/038d61fd642278bab63ee8ef722c50d10ab01e8f/include/uapi/linux/stat.h#L99-L193

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot label +stable-nominated

@rustbot rustbot added O-linux-like O-unix S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Aug 7, 2025
@Thomasdezeeuw
Copy link
Contributor Author

The CI failure is a Clippy complaints about code I didn't change:

error: this `if` statement can be collapsed
   --> ctest-next/src/translator.rs:221:9
    |
221 | /         if let syn::PathArguments::AngleBracketed(args) = &last.arguments {
222 | |             if let syn::GenericArgument::Type(inner_ty) = args.args.first().unwrap() {
223 | |                 // Option<T> is ONLY ffi-safe if it contains a function pointer, or a reference.
224 | |                 match inner_ty {
...   |
237 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
    = note: `-D clippy::collapsible-if` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::collapsible_if)]`
help: collapse nested if block
    |
221 ~         if let syn::PathArguments::AngleBracketed(args) = &last.arguments
222 ~             && let syn::GenericArgument::Type(inner_ty) = args.args.first().unwrap() {
223 |                 // Option<T> is ONLY ffi-safe if it contains a function pointer, or a reference.
...
235 |                 }
236 ~             }
    |

error: could not compile `ctest-next` (lib) due to 1 previous error

If the maintainers want I can send a pr for this, but I don't think it should be done in this pr.

@tgross35
Copy link
Contributor

These haven't yet been updated in glibc https://github.com/bminor/glibc/blob/a6eb8285d9bfb7ec0875b85ca356e833ff964d4f/io/bits/types/struct_statx.h#L30 or musl, so we should wait for that.

@rustbot blocked

The CI failure is a Clippy complaints about code I didn't change:

That has been fixed, should go away with a rebase

@tgross35
Copy link
Contributor

For reference, here's the glibc patchset adding this https://inbox.sourceware.org/libc-alpha/20251003194707.2326679-1-adhemerval.zanella@linaro.org/

@Thomasdezeeuw
Copy link
Contributor Author

@tgross35 it seems like the patchset was merged: https://github.com/bminor/glibc/blob/bd569425330c6f5644c232b4b253e9ab905fcdba/io/bits/types/struct_statx.h#L56-L62. Are there any requirements in terms of release/deployment of the glibc changes (i.e. a minimum version)? Or should I rebase and it's good to merge?

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tgross35 it seems like the patchset was merged: https://github.com/bminor/glibc/blob/bd569425330c6f5644c232b4b253e9ab905fcdba/io/bits/types/struct_statx.h#L56-L62. Are there any requirements in terms of release/deployment of the glibc changes (i.e. a minimum version)? Or should I rebase and it's good to merge?

Thanks for the update, nope that's about it. I'll merge after rebase and CI passing 👍

(Note you may need to skip these fields in libc-test/build.rs)

@rustbot
Copy link
Collaborator

rustbot commented Dec 28, 2025

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@Thomasdezeeuw
Copy link
Contributor Author

Thomasdezeeuw commented Dec 28, 2025

Rebased and added the padding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-linux-like O-unix S-blocked stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants