-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Update statx constants and types (Linux 6.8-6.14) #4401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
No idea why CI is failing. |
cb2a8ae
to
229b7af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as long as CI passes
c70e79b
to
1cb7f9b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like some of this may not be available on arm32 Android, can you check this against the bionic headers? https://cs.android.com/android/platform/superproject/main, cc @maurer
I'm not familiar with bionic/their source tree or how to check. Do we know it works on non-arm32 android (e.g. armv8)? Because the CI skipping it's sometimes hard to tell whether it broken because of architecture or libc or both. I can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tl;dr:
- Remove support for
statx_dio_read_align
on Android; it won't arrive for at least a year. - Bump the NDK version to 28, and the rest of your stuff should work.
This is going to be compatible from the Android PoV - only STATX_DIO_READ_ALIGN
is not yet present in bionic, and that's likely because the latest kernel version Android uses is 6.12 right now.
The reason you're getting an error from offsetof
for stx_subvol
is not because of the architecture, it's because NDK 27 (current LTS NDK) does not yet have that field. NDK 28 (stable and released, but not LTS) does.
Probably (subject to @tgross35 agreement) we should switch to NDK 28b in this PR.
Support in bionic for statx_dio_read_align
is probably more than a year out, because Android needs to release a kernel >= 6.14, and then needs to have an NDK release. I don't anticipate any differences between our support and anyone else's, but no Android device will exist that supports it for at least a year, so it'd be a mistake to try to use it. I'd suggest configuring out statx_dio_read_align
both field and constant.
pub const STATX_MNT_ID_UNIQUE: c_uint = 0x4000; | ||
pub const STATX_SUBVOL: c_uint = 0x_0000_8000; | ||
pub const STATX_WRITE_ATOMIC: c_uint = 0x_0001_0000; | ||
pub const STATX_DIO_READ_ALIGN: c_uint = 0x_0002_0000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This constant is not yet present in bionic, likely because it was introduced to Linux in 6.14, and the latest Android kernel is 6.12.
I have no objections to bumping the version. Is there any chance you, or anyone else from the android team / more familiar, might be able to do it in a separate PR? We have been having some pretty consistent intermittent failures (#4297), it would be good for somebody more familiar with the platform to double check that the way we are setting up and testing actually makes sense. |
Description
This PR updates statx constants and types for features added in Linux 6.8 to 6.14.
Sources
Checklist
libc-test/semver
have been updated*LAST
or*MAX
areincluded (see #3131)
cd libc-test && cargo test --target mytarget
);especially relevant for platforms that may not be checked in CI
@rustbot label +stable-nominated