This patches provides one interface for enabling direct IO from user space: - userspace(such as losetup) can pass 'file' which is opened/fcntl as O_DIRECT Also __loop_update_dio() is introduced to check if direct I/O can be used on current loop setting. The last big change is to introduce LO_FLAGS_DIRECT_IO flag for userspace to know if direct IO is used to access backing file.
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -21,6 +21,7 @@ enum { · 20 unmodified lines | ||
| 21 | 21 | LO_FLAGS_READ_ONLY = 1, |
| 22 | 22 | LO_FLAGS_AUTOCLEAR = 4, |
| 23 | 23 | LO_FLAGS_PARTSCAN = 8, |
| 24 | + LO_FLAGS_DIRECT_IO = 16, | |
| 24 | 25 | }; |
| 25 | 26 | |
| 26 | 27 | #include <asm/posix_types.h> /* for __kernel_old_dev_t */ |