mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-83714: Check for struct statx.stx_atomic_write_unit_max_opt in configure (#140185)
stx_atomic_write_unit_max_opt was added in Linux 6.16, but is controlled by the STATX_WRITE_ATOMIC mask bit added in Linux 6.11. That's safe at runtime because all kernels clear the reserved space in struct statx and zero is a valid value for stx_atomic_write_unit_max_opt, and it avoids allocating another mask bit, which are a limited resource. But it also means the kernel headers don't provide a way to check whether stx_atomic_write_unit_max_opt exists, so add a configure check.
This commit is contained in:
parent
ea4cc585cd
commit
5a31024da4
5 changed files with 28 additions and 2 deletions
|
|
@ -3369,7 +3369,7 @@ static PyMemberDef pystatx_result_members[] = {
|
|||
MM(stx_atomic_write_segments_max, Py_T_UINT, atomic_write_segments_max,
|
||||
"maximum iovecs for direct I/O with torn-write protection"),
|
||||
#endif
|
||||
#if 0
|
||||
#ifdef HAVE_STRUCT_STATX_STX_ATOMIC_WRITE_UNIT_MAX_OPT
|
||||
MM(stx_atomic_write_unit_max_opt, Py_T_UINT, atomic_write_unit_max_opt,
|
||||
"maximum optimized size for direct I/O with torn-write protection"),
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue