Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools headers UAPI: sync linux/fs.h with the kernel sources

Required for a new PAGEMAP_SCAN test to verify guard region reporting.

Link: https://lkml.kernel.org/r/20250324065328.107678-3-avagin@google.com
Signed-off-by: Andrei Vagin <avagin@gmail.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Andrei Vagin and committed by
Andrew Morton
267bee0c a5164037

+18 -1
+18 -1
tools/include/uapi/linux/fs.h
··· 40 40 #define BLOCK_SIZE_BITS 10 41 41 #define BLOCK_SIZE (1<<BLOCK_SIZE_BITS) 42 42 43 + /* flags for integrity meta */ 44 + #define IO_INTEGRITY_CHK_GUARD (1U << 0) /* enforce guard check */ 45 + #define IO_INTEGRITY_CHK_REFTAG (1U << 1) /* enforce ref check */ 46 + #define IO_INTEGRITY_CHK_APPTAG (1U << 2) /* enforce app check */ 47 + 48 + #define IO_INTEGRITY_VALID_FLAGS (IO_INTEGRITY_CHK_GUARD | \ 49 + IO_INTEGRITY_CHK_REFTAG | \ 50 + IO_INTEGRITY_CHK_APPTAG) 51 + 43 52 #define SEEK_SET 0 /* seek relative to beginning of file */ 44 53 #define SEEK_CUR 1 /* seek relative to current file position */ 45 54 #define SEEK_END 2 /* seek relative to end of file */ ··· 338 329 /* per-IO negation of O_APPEND */ 339 330 #define RWF_NOAPPEND ((__force __kernel_rwf_t)0x00000020) 340 331 332 + /* Atomic Write */ 333 + #define RWF_ATOMIC ((__force __kernel_rwf_t)0x00000040) 334 + 335 + /* buffered IO that drops the cache after reading or writing data */ 336 + #define RWF_DONTCACHE ((__force __kernel_rwf_t)0x00000080) 337 + 341 338 /* mask of flags supported by the kernel */ 342 339 #define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT |\ 343 - RWF_APPEND | RWF_NOAPPEND) 340 + RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC |\ 341 + RWF_DONTCACHE) 344 342 345 343 #define PROCFS_IOCTL_MAGIC 'f' 346 344 ··· 363 347 #define PAGE_IS_PFNZERO (1 << 5) 364 348 #define PAGE_IS_HUGE (1 << 6) 365 349 #define PAGE_IS_SOFT_DIRTY (1 << 7) 350 + #define PAGE_IS_GUARD (1 << 8) 366 351 367 352 /* 368 353 * struct page_region - Page region with flags