History

iomap: Allow forcing of waiting for running DIO in iomap_dio_rw()

Filesystems do not support doing IO as asynchronous in some cases. For example in case of unaligned writes or in case file size needs to be extended (e.g. for ext4). Instead of forcing filesystem to wait for AIO in such cases, add argument to iomap_dio_rw() which makes the function wait for IO completion. This also results in executing iomap_dio_complete() inline in iomap_dio_rw() providing its return value to the caller as for ordinary sync IO.

Jan Kara committed 7 years ago

Commit 13ef9541 parent 4f5cafb4 files · +14 −7Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/iomap.h+2−1
@@ -195,7 +195,8 @@ struct iomap_dio_ops { · 194 unmodified lines
195195 };
196196
197197 ssize_t iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
198− const struct iomap_ops *ops, const struct iomap_dio_ops *dops);
198+ const struct iomap_ops *ops, const struct iomap_dio_ops *dops,
199+ bool wait_for_completion);
199200 int iomap_dio_iopoll(struct kiocb *kiocb, bool spin);
200201
201202 #ifdef CONFIG_SWAP

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t