Skip to content

linux: add new flags for pwritev2/preadv2 - #4452

Merged
tgross35 merged 1 commit into
mainfrom
more-pwritev2-flags
May 13, 2025
Merged

linux: add new flags for pwritev2/preadv2#4452
tgross35 merged 1 commit into
mainfrom
more-pwritev2-flags

Conversation

@the8472

@the8472 the8472 commented May 11, 2025

Copy link
Copy Markdown
Member

Description

RWF_* flags supported by newer linux kernels.

  • RWF_NOAPPEND
  • RWF_ATOMIC
  • RWF_DONTCACHE (doesn't have a manpage entry yet)

Sources

https://github.com/torvalds/linux/blob/3ce9925823c7d6bb0e6eb951bf2db0e9e182582d/include/uapi/linux/fs.h#L336-L343

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see rust-lang/libc#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-gnu O-linux O-musl O-unix S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels May 11, 2025
@the8472

the8472 commented May 11, 2025

Copy link
Copy Markdown
Member Author

Hrm, I guess it's testing against CI kernel and its headers aren't new enough?

@the8472
the8472 force-pushed the more-pwritev2-flags branch 3 times, most recently from 0489c1b to 5a5e1e5 Compare May 11, 2025 15:10

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since these are uapi, they can go in linux_like/linux/mod.rs to cover both glibc and musl (and others)

@tgross35
tgross35 force-pushed the more-pwritev2-flags branch from 8db1dff to 6e7549d Compare May 13, 2025 15:47

@tgross35 tgross35 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pushed to squash since I can't do it with the merge queue API

@tgross35
tgross35 enabled auto-merge May 13, 2025 15:47
@tgross35
tgross35 added this pull request to the merge queue May 13, 2025
Merged via the queue into main with commit a1e4649 May 13, 2025
@the8472
the8472 deleted the more-pwritev2-flags branch May 15, 2025 22:05
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Jun 1, 2025
(backport <rust-lang#4452>)
(cherry picked from commit 6e7549d)
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Jun 1, 2025
(backport <rust-lang#4452>)
(cherry picked from commit 6e7549d)
@tgross35 tgross35 mentioned this pull request Jun 1, 2025
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Jun 2, 2025
DorianNiemiecSVRJS pushed a commit to DorianNiemiecSVRJS/rust-libc that referenced this pull request Jun 21, 2025
(backport <rust-lang#4452>)
(cherry picked from commit 6e7549d)
Elie-Kh added a commit to Elie-Kh/libc that referenced this pull request Jun 8, 2026
Add preadv2 and pwrite2 to linux and Android, making majority of
linux_like based systems have support, to allow using the new flags
introduced in rust-lang#4452.
Move definitions to linux_like/mod.rs instead of each separate system
alone.
Elie-Kh added a commit to Elie-Kh/libc that referenced this pull request Jun 8, 2026
Add preadv2 and pwrite2 to linux and Android, making majority of
linux_like based systems have support, to allow using the new flags
introduced in rust-lang#4452.
Move definitions to linux_like/mod.rs instead of each separate system
alone.
Elie-Kh added a commit to Elie-Kh/libc that referenced this pull request Jun 8, 2026
Add preadv2 and pwrite2 to linux and Android, to allow using the new flags
introduced in rust-lang#4452.
Move definitions from musl and gnu to linux/mod.rs instead of each
separate system alone.
Skip test on Android due to the definitions being introduced in API 33
Elie-Kh added a commit to Elie-Kh/libc that referenced this pull request Jun 9, 2026
Add preadv2 and pwrite2 to linux and Android, to allow using the new flags
introduced in rust-lang#4452.
Move definitions from musl and gnu to linux/mod.rs instead of each
separate system alone.
Skip test on Android due to the definitions being introduced in API 33
Elie-Kh added a commit to Elie-Kh/libc that referenced this pull request Jun 9, 2026
Add preadv2 and pwrite2 to linux and Android, to allow using the new flags
introduced in rust-lang#4452. Add flags to Android too
Move definitions from musl and gnu to linux/mod.rs instead of each
separate system alone.
Skip test on Android due to the definitions being introduced in API 33
Elie-Kh added a commit to Elie-Kh/libc that referenced this pull request Jun 9, 2026
Add preadv2 and pwrite2 to linux and Android, to allow using the new flags
introduced in rust-lang#4452. Add flags to Android too
Move definitions from musl and gnu to linux/mod.rs instead of each
separate system alone.
Skip test on Android due to the definitions being introduced in API 33
JohnTitor pushed a commit to Elie-Kh/libc that referenced this pull request Jun 14, 2026
Add preadv2 and pwrite2 to linux and Android, to allow using the new flags
introduced in rust-lang#4452. Add flags to Android too
Move definitions from musl and gnu to linux/mod.rs instead of each
separate system alone.
Skip test on Android due to the definitions being introduced in API 33
Elie-Kh added a commit to Elie-Kh/libc that referenced this pull request Jun 17, 2026
Add preadv2 and pwrite2 to linux and Android, to allow using the new flags
introduced in rust-lang#4452. Add flags to Android too
Move definitions from musl and gnu to linux/mod.rs instead of each
separate system alone.
Skip test on Android due to the definitions being introduced in API 33
Elie-Kh added a commit to Elie-Kh/libc that referenced this pull request Jun 24, 2026
Add preadv2 and pwrite2 to linux and Android, to allow using the new flags
introduced in rust-lang#4452. Add flags to Android too
Move definitions from musl and gnu to linux/mod.rs instead of each
separate system alone.
Skip test on Android due to the definitions being introduced in API 33
Elie-Kh added a commit to Elie-Kh/libc that referenced this pull request Jul 10, 2026
Add preadv2 and pwrite2 to linux and Android, to allow using the new flags
introduced in rust-lang#4452. Add flags to Android too
Move definitions from musl and gnu to linux/mod.rs instead of each
separate system alone.
Skip test on Android due to the definitions being introduced in API 33
Elie-Kh added a commit to Elie-Kh/libc that referenced this pull request Jul 13, 2026
Add preadv2 and pwrite2 to linux and Android, to allow using the new flags
introduced in rust-lang#4452. Add flags to Android too
Move definitions from musl and gnu to linux/mod.rs instead of each
separate system alone.
Skip test on Android due to the definitions being introduced in API 33
Elie-Kh added a commit to Elie-Kh/libc that referenced this pull request Jul 20, 2026
Add preadv2 and pwrite2 to linux and Android, to allow using the new flags
introduced in rust-lang#4452. Add flags to Android too
Move definitions from musl and gnu to linux/mod.rs instead of each
separate system alone.
Skip test on Android due to the definitions being introduced in API 33
Elie-Kh added a commit to Elie-Kh/libc that referenced this pull request Jul 20, 2026
Add preadv2 and pwrite2 to Android, to allow using the new flags
introduced in rust-lang#4452. Add flags to Android too
Skip test on Android due to the definitions being introduced in API 33
Elie-Kh added a commit to Elie-Kh/libc that referenced this pull request Jul 20, 2026
Add preadv2 and pwrite2 to Android, to allow using the new flags
introduced in rust-lang#4452. Add flags to Android too
Skip test on Android due to the definitions being introduced in API 33
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Jul 20, 2026
Add preadv2 and pwrite2 to Android, to allow using the new flags
introduced in rust-lang#4452. Add flags to Android too
Skip test on Android due to the definitions being introduced in API 33

(backport <rust-lang#5157>)
(cherry picked from commit 63fde92)
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Jul 20, 2026
Add preadv2 and pwrite2 to Android, to allow using the new flags
introduced in rust-lang#4452. Add flags to Android too
Skip test on Android due to the definitions being introduced in API 33

(backport <rust-lang#5157>)
(cherry picked from commit 63fde92)
nickrobinson pushed a commit to nickrobinson/libc that referenced this pull request Jul 20, 2026
Add preadv2 and pwrite2 to Android, to allow using the new flags
introduced in rust-lang#4452. Add flags to Android too
Skip test on Android due to the definitions being introduced in API 33
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Jul 20, 2026
Add preadv2 and pwrite2 to Android, to allow using the new flags
introduced in rust-lang#4452. Add flags to Android too
Skip test on Android due to the definitions being introduced in API 33

(backport <rust-lang#5157>)
(cherry picked from commit 63fde92)
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Jul 20, 2026
Add preadv2 and pwrite2 to Android, to allow using the new flags
introduced in rust-lang#4452. Add flags to Android too
Skip test on Android due to the definitions being introduced in API 33

(backport <rust-lang#5157>)
(cherry picked from commit 63fde92)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-gnu O-linux O-musl O-unix S-waiting-on-review stable-applied This PR has been cherry-picked to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants