History

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.

Ming Lei committed 11 years ago

Commit 2e5ab5f1 parent e03a3d73 files · +79 −0Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/loop.h+1−0
@@ -21,6 +21,7 @@ enum { · 20 unmodified lines
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 */

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