Skip to content

Commit 9e63320

Browse files
committed
Auto merge of #3076 - ETKNeil:add-statx-dioalign, r=JohnTitor
Add STATX_DIOALIGN (introduced in linux v6.1) The [STATX_DIOALIGN](https://elixir.bootlin.com/linux/v6.1/A/ident/STATX_DIOALIGN) constant was introduced in linux 6.1 The statx structure thus gained [2 more fields](https://elixir.bootlin.com/linux/v6.1/source/include/uapi/linux/stat.h#L127)
2 parents 89fb7bf + 69f06d1 commit 9e63320

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

libc-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3596,6 +3596,9 @@ fn test_linux(target: &str) {
35963596
// Added in Linux 5.14
35973597
"FUTEX_LOCK_PI2" => true,
35983598

3599+
// Added in linux 6.1
3600+
"STATX_DIOALIGN" => true,
3601+
35993602
// FIXME: Parts of netfilter/nfnetlink*.h require more recent kernel headers:
36003603
| "RTNLGRP_MCTP_IFADDR" // linux v5.17+
36013604
| "RTNLGRP_TUNNEL" // linux v5.18+

libc-test/semver/linux-gnu.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ STATX_BASIC_STATS
435435
STATX_BLOCKS
436436
STATX_BTIME
437437
STATX_CTIME
438+
STATX_DIOALIGN
438439
STATX_GID
439440
STATX_INO
440441
STATX_MNT_ID

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ s! {
3737
pub stx_dev_major: u32,
3838
pub stx_dev_minor: u32,
3939
pub stx_mnt_id: u64,
40-
__statx_pad2: u64,
40+
pub stx_dio_mem_align: u32,
41+
pub stx_dio_offset_align: u32,
4142
__statx_pad3: [u64; 12],
4243
}
4344

@@ -1022,6 +1023,7 @@ pub const STATX_BLOCKS: ::c_uint = 0x0400;
10221023
pub const STATX_BASIC_STATS: ::c_uint = 0x07ff;
10231024
pub const STATX_BTIME: ::c_uint = 0x0800;
10241025
pub const STATX_MNT_ID: ::c_uint = 0x1000;
1026+
pub const STATX_DIOALIGN: ::c_uint = 0x2000;
10251027
pub const STATX_ALL: ::c_uint = 0x0fff;
10261028
pub const STATX__RESERVED: ::c_int = 0x80000000;
10271029
pub const STATX_ATTR_COMPRESSED: ::c_int = 0x0004;

0 commit comments

Comments
 (0)