History

fs: add RWF_APPEND

This is the per-I/O equivalent of O_APPEND to support atomic append operations on any open file. If a file is opened with O_APPEND, pwrite() ignores the offset and always appends data to the end of the file. RWF_APPEND enables atomic append and pwrite() with offset on a single file descriptor.

Jürg Billeter committed 9 years ago

Commit e1fc7421 parent c981f252 files · +7 −1Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/fs.h+5−1
@@ -377,7 +377,11 @@ typedef int __bitwise __kernel_rwf_t; · 376 unmodified lines
377377 /* per-IO, return -EAGAIN if operation would block */
378378 #define RWF_NOWAIT ((__force __kernel_rwf_t)0x00000008)
379379
380+/* per-IO O_APPEND */
381+#define RWF_APPEND ((__force __kernel_rwf_t)0x00000010)
382+
380383 /* mask of flags supported by the kernel */
381−#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT)
384+#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT |\
385+ RWF_APPEND)
382386
383387 #endif /* _UAPI_LINUX_FS_H */