diff options
| author | Ming Lei <ming.lei@canonical.com> | 2015-08-16 22:31:49 -0400 |
|---|---|---|
| committer | Jens Axboe <axboe@fb.com> | 2015-09-23 13:01:16 -0400 |
| commit | 2e5ab5f379f96a6207c45be40c357ebb1beb8ef3 (patch) | |
| tree | 462de913cce458163752b33624537f479122b51b /include/uapi/linux/loop.h | |
| parent | e03a3d7a94e2485b6e2fa3fb630b9b3a30b65718 (diff) | |
block: loop: prepare for supporing direct IO
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.
Cc: linux-api@vger.kernel.org
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/uapi/linux/loop.h')
| -rw-r--r-- | include/uapi/linux/loop.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/loop.h b/include/uapi/linux/loop.h index e0cecd2eabdc..949851ce681f 100644 --- a/include/uapi/linux/loop.h +++ b/include/uapi/linux/loop.h | |||
| @@ -21,6 +21,7 @@ enum { | |||
| 21 | LO_FLAGS_READ_ONLY = 1, | 21 | LO_FLAGS_READ_ONLY = 1, |
| 22 | LO_FLAGS_AUTOCLEAR = 4, | 22 | LO_FLAGS_AUTOCLEAR = 4, |
| 23 | LO_FLAGS_PARTSCAN = 8, | 23 | LO_FLAGS_PARTSCAN = 8, |
| 24 | LO_FLAGS_DIRECT_IO = 16, | ||
| 24 | }; | 25 | }; |
| 25 | 26 | ||
| 26 | #include <asm/posix_types.h> /* for __kernel_old_dev_t */ | 27 | #include <asm/posix_types.h> /* for __kernel_old_dev_t */ |
