summaryrefslogtreecommitdiffstats
path: root/include/loopdev.h
diff options
context:
space:
mode:
authorMing Lei2015-11-17 15:32:47 +0100
committerKarel Zak2015-11-19 11:27:36 +0100
commit64c3bb3cb7ead2faa97aa6d400d65f392df3dba8 (patch)
treec4d0d92ea1f494c3d981d3614b79b1f033f9a75f /include/loopdev.h
parentblkid: don't mark zfs as RAID (diff)
downloadkernel-qcow2-util-linux-64c3bb3cb7ead2faa97aa6d400d65f392df3dba8.tar.gz
kernel-qcow2-util-linux-64c3bb3cb7ead2faa97aa6d400d65f392df3dba8.tar.xz
kernel-qcow2-util-linux-64c3bb3cb7ead2faa97aa6d400d65f392df3dba8.zip
losetup: support ioctl cmd of LOOP_SET_DIRECT_IO
From v4.4, linux kernel starts to support direct I/O and AIO to backing file for loop driver, so allow losetup to enable the feature by using LOOP_SET_DIRECT_IO ioctl cmd. Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Diffstat (limited to 'include/loopdev.h')
-rw-r--r--include/loopdev.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/loopdev.h b/include/loopdev.h
index 573a5699d..9a7f6ba69 100644
--- a/include/loopdev.h
+++ b/include/loopdev.h
@@ -23,6 +23,7 @@
#define LOOP_GET_STATUS64 0x4C05
/* #define LOOP_CHANGE_FD 0x4C06 */
#define LOOP_SET_CAPACITY 0x4C07
+#define LOOP_SET_DIRECT_IO 0x4C08
/* /dev/loop-control interface */
#ifndef LOOP_CTL_ADD
@@ -164,6 +165,7 @@ extern int loopcxt_next(struct loopdev_cxt *lc);
extern int loopcxt_setup_device(struct loopdev_cxt *lc);
extern int loopcxt_delete_device(struct loopdev_cxt *lc);
extern int loopcxt_set_capacity(struct loopdev_cxt *lc);
+extern int loopcxt_set_dio(struct loopdev_cxt *lc, unsigned long use_dio);
int loopcxt_set_offset(struct loopdev_cxt *lc, uint64_t offset);
int loopcxt_set_sizelimit(struct loopdev_cxt *lc, uint64_t sizelimit);