mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 14:52:34 +00:00
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>
This commit is contained in:
parent
e03a3d7a94
commit
2e5ab5f379
3 changed files with 79 additions and 0 deletions
|
@ -21,6 +21,7 @@ enum {
|
|||
LO_FLAGS_READ_ONLY = 1,
|
||||
LO_FLAGS_AUTOCLEAR = 4,
|
||||
LO_FLAGS_PARTSCAN = 8,
|
||||
LO_FLAGS_DIRECT_IO = 16,
|
||||
};
|
||||
|
||||
#include <asm/posix_types.h> /* for __kernel_old_dev_t */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue