diff options
author | Jürg Billeter <j@bitron.ch> | 2017-09-29 14:07:17 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-01-25 19:32:55 -0500 |
commit | e1fc742e14e01d84d9693c4aca4ab23da65811fb (patch) | |
tree | 5f6aa92ad10ebd83a667d246b17c8fb4e3cb8f4e /include/uapi/linux | |
parent | c981f254cc82f50f8cb864ce6432097b23195b9c (diff) |
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.
Signed-off-by: Jürg Billeter <j@bitron.ch>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r-- | include/uapi/linux/fs.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h index 4199f8acbce5..d2a8313fabd7 100644 --- a/include/uapi/linux/fs.h +++ b/include/uapi/linux/fs.h @@ -377,7 +377,11 @@ typedef int __bitwise __kernel_rwf_t; /* per-IO, return -EAGAIN if operation would block */ #define RWF_NOWAIT ((__force __kernel_rwf_t)0x00000008) +/* per-IO O_APPEND */ +#define RWF_APPEND ((__force __kernel_rwf_t)0x00000010) + /* mask of flags supported by the kernel */ -#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT) +#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT |\ + RWF_APPEND) #endif /* _UAPI_LINUX_FS_H */ |