]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/block/loop.h
Merge remote-tracking branch 'trivial/for-next'
[karo-tx-linux.git] / drivers / block / loop.h
index 25e8997ed2467f2aa1478636780d0bbb918a6cd8..fb2237c73e618ed78eaa5ea2835817e9a53222cb 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/blk-mq.h>
 #include <linux/spinlock.h>
 #include <linux/mutex.h>
-#include <linux/workqueue.h>
+#include <linux/kthread.h>
 #include <uapi/linux/loop.h>
 
 /* Possible states of device */
@@ -54,12 +54,11 @@ struct loop_device {
        gfp_t           old_gfp_mask;
 
        spinlock_t              lo_lock;
-       struct workqueue_struct *wq;
-       struct list_head        write_cmd_head;
-       struct work_struct      write_work;
-       bool                    write_started;
        int                     lo_state;
        struct mutex            lo_ctl_mutex;
+       struct kthread_worker   worker;
+       struct task_struct      *worker_task;
+       bool                    use_dio;
 
        struct request_queue    *lo_queue;
        struct blk_mq_tag_set   tag_set;
@@ -67,9 +66,11 @@ struct loop_device {
 };
 
 struct loop_cmd {
-       struct work_struct read_work;
+       struct kthread_work work;
        struct request *rq;
        struct list_head list;
+       bool use_aio;           /* use AIO interface to handle I/O */
+       struct kiocb iocb;
 };
 
 /* Support for loadable transfer modules */