]> git.dujemihanovic.xyz Git - linux.git/commitdiff
iomap: Remove IOMAP_DIO_NOSYNC unused dio flag
authorRitesh Harjani (IBM) <ritesh.list@gmail.com>
Fri, 21 Apr 2023 15:52:43 +0000 (08:52 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 21 Apr 2023 15:54:47 +0000 (08:54 -0700)
IOMAP_DIO_NOSYNC earlier was added for use in btrfs. But it seems for
aio dsync writes this is not useful anyway. For aio dsync case, we
we queue the request and return -EIOCBQUEUED. Now, since IOMAP_DIO_NOSYNC
doesn't let iomap_dio_complete() to call generic_write_sync(),
hence we may lose the sync write.

Hence kill this flag as it is not in use by any FS now.

Tested-by: Disha Goel <disgoel@linux.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/iomap/direct-io.c
include/linux/iomap.h

index f771001574d008fd9c138d5a985cf13b2eda9f9e..36ab1152dbeadcf96a096c2e07b03b4046bf239b 100644 (file)
@@ -541,7 +541,7 @@ __iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
                }
 
                /* for data sync or sync, we need sync completion processing */
-               if (iocb_is_dsync(iocb) && !(dio_flags & IOMAP_DIO_NOSYNC)) {
+               if (iocb_is_dsync(iocb)) {
                        dio->flags |= IOMAP_DIO_NEED_SYNC;
 
                       /*
index 0f8123504e5eb2c78e8ec4ae01b4de2c01f4227b..e2b836c2e119ae7d574874ddd35732a4e30e7d3a 100644 (file)
@@ -377,12 +377,6 @@ 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);