]> www.infradead.org Git - users/jedix/linux-maple.git/commit
block: loop: prepare for supporing direct IO
authorMing Lei <ming.lei@canonical.com>
Sun, 28 Jun 2015 06:06:32 +0000 (23:06 -0700)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Mon, 29 Jun 2015 15:33:45 +0000 (08:33 -0700)
commitaad2078d56ca9073e5b1552fbee3773678cfc2a2
treea45db703cec00610ef610ceda0d6e4d219c49227
parent17474762d59a4c50e35cef7173acf6fe84c7c109
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>
Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
drivers/block/loop.c
drivers/block/loop.h
include/uapi/linux/loop.h