diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-06-07 16:04:03 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2022-06-10 16:03:35 -0400 |
commit | 36518b6b4da7e8d4387bc19ad21e772f1060e9d7 (patch) | |
tree | b091764545f997c76f720f13914f2b171d9737e4 /include/linux/iomap.h | |
parent | 0e3c3b901c00364198d31482fa2552ccf2d5c899 (diff) | |
download | linux-36518b6b4da7e8d4387bc19ad21e772f1060e9d7.tar.gz |
teach iomap_dio_rw() to suppress dsync
New flag, equivalent to removal of IOCB_DSYNC from iocb flags.
This mimics what btrfs is doing (and that's what btrfs will
switch to). However, I'm not at all sure that we want to
suppress REQ_FUA for those - all btrfs hack really cares about
is suppression of generic_write_sync(). For now let's keep
the existing behaviour, but I really want to hear more detailed
arguments pro or contra.
[folded brain fix from willy]
Suggested-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/iomap.h')
-rw-r--r-- | include/linux/iomap.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/iomap.h b/include/linux/iomap.h index e552097c67e0..c8622d8f064e 100644 --- a/include/linux/iomap.h +++ b/include/linux/iomap.h @@ -353,6 +353,12 @@ struct iomap_dio_ops { */ #define IOMAP_DIO_PARTIAL (1 << 2) +/* + * The caller will sync the write if needed; do not sync it within + * iomap_dio_rw. Overrides IOMAP_DIO_FORCE_WAIT. + */ +#define IOMAP_DIO_NOSYNC (1 << 3) + ssize_t iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter, const struct iomap_ops *ops, const struct iomap_dio_ops *dops, unsigned int dio_flags, void *private, size_t done_before); |