block: loop: improve performance via blk-mq
[deliverable/linux.git] / drivers / block / loop.h
index 90df5d6485b696bf897dbdf204fa4fea3c414b63..e20cdbbff7d5e83f9497b0e8c4de1948cc6c93e3 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/blkdev.h>
 #include <linux/spinlock.h>
 #include <linux/mutex.h>
+#include <linux/workqueue.h>
 #include <uapi/linux/loop.h>
 
 /* Possible states of device */
@@ -52,19 +53,23 @@ struct loop_device {
        gfp_t           old_gfp_mask;
 
        spinlock_t              lo_lock;
-       struct bio_list         lo_bio_list;
-       unsigned int            lo_bio_count;
+       struct list_head        write_cmd_head;
+       struct work_struct      write_work;
+       bool                    write_started;
        int                     lo_state;
        struct mutex            lo_ctl_mutex;
-       struct task_struct      *lo_thread;
-       wait_queue_head_t       lo_event;
-       /* wait queue for incoming requests */
-       wait_queue_head_t       lo_req_wait;
 
        struct request_queue    *lo_queue;
+       struct blk_mq_tag_set   tag_set;
        struct gendisk          *lo_disk;
 };
 
+struct loop_cmd {
+       struct work_struct read_work;
+       struct request *rq;
+       struct list_head list;
+};
+
 /* Support for loadable transfer modules */
 struct loop_func_table {
        int number;     /* filter type */ 
This page took 0.036781 seconds and 5 git commands to generate.