Skip to content

Commit d3bff1f

Browse files
riteshharjaniDarrick J. Wong
authored andcommitted
iomap: Remove IOMAP_DIO_NOSYNC unused dio flag
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>
1 parent f6c73a1 commit d3bff1f

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

fs/iomap/direct-io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ __iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
541541
}
542542

543543
/* for data sync or sync, we need sync completion processing */
544-
if (iocb_is_dsync(iocb) && !(dio_flags & IOMAP_DIO_NOSYNC)) {
544+
if (iocb_is_dsync(iocb)) {
545545
dio->flags |= IOMAP_DIO_NEED_SYNC;
546546

547547
/*

include/linux/iomap.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,6 @@ struct iomap_dio_ops {
377377
*/
378378
#define IOMAP_DIO_PARTIAL (1 << 2)
379379

380-
/*
381-
* The caller will sync the write if needed; do not sync it within
382-
* iomap_dio_rw. Overrides IOMAP_DIO_FORCE_WAIT.
383-
*/
384-
#define IOMAP_DIO_NOSYNC (1 << 3)
385-
386380
ssize_t iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
387381
const struct iomap_ops *ops, const struct iomap_dio_ops *dops,
388382
unsigned int dio_flags, void *private, size_t done_before);

0 commit comments

Comments
 (0)