Linux 6.14 adds the new flag for uncached buffered IO on a filesystem
supporting it.
This caused two test failures as these tests expected the flag
0x00000080 is unused. Add the flag definition to fix these tests on
Linux >= 6.14:
FAIL: misc/tst-preadvwritev2
FAIL: misc/tst-preadvwritev64v2
The test failures were not detected in routine test suite runs because
normally we create the test file in /tmp, where a tmpfs is usually
mounted, and tmpfs does not support this flag. But it can be reproduced
with TMPDIR set to some directory in an ext4 file system.
Link: https://git.kernel.org/torvalds/c/af6505e5745b
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
The @code{atomic_*} values can be obtained with @code{statx} along with
@code{STATX_WRITE_ATOMIC} flag.
+@item RWF_DONTCACHE
+Use uncached buffered IO. If the file system does not support it, the
+call will fail and set @code{errno} to @code{EOPNOTSUPP}.
+
This is a Linux-specific extension.
@end vtable
#ifndef RWF_ATOMIC
# define RWF_ATOMIC 0
#endif
+#ifndef RWF_DONTCACHE
+# define RWF_DONTCACHE 0
+#endif
#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT \
- | RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC)
+ | RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC \
+ | RWF_DONTCACHE)
/* Generic uio_lim.h does not define IOV_MAX. */
#ifndef IOV_MAX
#define RWF_NOAPPEND 0x00000020 /* per-IO negation of O_APPEND */
#define RWF_ATOMIC 0x00000040 /* Write is to be issued with torn-write
prevention. */
+#define RWF_DONTCACHE 0x00000080 /* Uncached buffered IO. */
__END_DECLS