aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorStefan Roesch <shr@fb.com>2022-06-23 10:51:50 -0700
committerJens Axboe <axboe@kernel.dk>2022-07-24 18:39:31 -0600
commit8017553980d0bbfef3e66c583363828565afd6da (patch)
treec02bf0bc996e1ba246d94070b937f727109ac9a0 /include/linux/fs.h
parentiomap: Return -EAGAIN from iomap_write_iter() (diff)
downloadwireguard-linux-8017553980d0bbfef3e66c583363828565afd6da.tar.xz
wireguard-linux-8017553980d0bbfef3e66c583363828565afd6da.zip
fs: add a FMODE_BUF_WASYNC flags for f_mode
This introduces the flag FMODE_BUF_WASYNC. If devices support async buffered writes, this flag can be set. It also modifies the check in generic_write_checks to take async buffered writes into consideration. Signed-off-by: Stefan Roesch <shr@fb.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Christian Brauner (Microsoft) <brauner@kernel.org> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Link: https://lore.kernel.org/r/20220623175157.1715274-8-shr@fb.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 9ad5e3520fae..bc84847c201e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -180,6 +180,9 @@ typedef int (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
/* File supports async buffered reads */
#define FMODE_BUF_RASYNC ((__force fmode_t)0x40000000)
+/* File supports async nowait buffered writes */
+#define FMODE_BUF_WASYNC ((__force fmode_t)0x80000000)
+
/*
* Attribute flags. These should be or-ed together to figure out what
* has been changed!