Merge branch 'x86-ras-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git] / include / linux / blkdev.h
index 6bc011a..8aba35f 100644 (file)
@@ -99,7 +99,6 @@ struct request {
        struct list_head queuelist;
        union {
                struct call_single_data csd;
-               struct work_struct requeue_work;
                unsigned long fifo_time;
        };
 
@@ -463,6 +462,10 @@ struct request_queue {
        struct request          *flush_rq;
        spinlock_t              mq_flush_lock;
 
+       struct list_head        requeue_list;
+       spinlock_t              requeue_lock;
+       struct work_struct      requeue_work;
+
        struct mutex            sysfs_lock;
 
        int                     bypass_depth;
@@ -507,6 +510,7 @@ struct request_queue {
 #define QUEUE_FLAG_SAME_FORCE  18      /* force complete on same CPU */
 #define QUEUE_FLAG_DEAD        19      /* queue tear-down finished */
 #define QUEUE_FLAG_INIT_DONE   20      /* queue is initialized */
+#define QUEUE_FLAG_NO_SG_MERGE 21      /* don't attempt to merge SG segments*/
 
 #define QUEUE_FLAG_DEFAULT     ((1 << QUEUE_FLAG_IO_STAT) |            \
                                 (1 << QUEUE_FLAG_STACKABLE)    |       \
@@ -616,6 +620,15 @@ static inline void queue_flag_clear(unsigned int flag, struct request_queue *q)
 
 #define rq_data_dir(rq)                (((rq)->cmd_flags & 1) != 0)
 
+/*
+ * Driver can handle struct request, if it either has an old style
+ * request_fn defined, or is blk-mq based.
+ */
+static inline bool queue_is_rq_based(struct request_queue *q)
+{
+       return q->request_fn || q->mq_ops;
+}
+
 static inline unsigned int blk_queue_cluster(struct request_queue *q)
 {
        return q->limits.cluster;
@@ -1057,7 +1070,6 @@ static inline void blk_post_runtime_resume(struct request_queue *q, int err) {}
  * schedule() where blk_schedule_flush_plug() is called.
  */
 struct blk_plug {
-       unsigned long magic; /* detect uninitialized use-cases */
        struct list_head list; /* requests */
        struct list_head mq_list; /* blk-mq requests */
        struct list_head cb_list; /* md requires an unplug callback */