]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - block/blk.h
UBUNTU: Ubuntu-4.10.0-37.41
[mirror_ubuntu-zesty-kernel.git] / block / blk.h
index c37492f5edaaece9c7603a6844872c3f279cefb0..041185e5f12994dc146528db2627707e42a700ee 100644 (file)
@@ -39,14 +39,9 @@ extern struct ida blk_queue_ida;
 static inline struct blk_flush_queue *blk_get_flush_queue(
                struct request_queue *q, struct blk_mq_ctx *ctx)
 {
-       struct blk_mq_hw_ctx *hctx;
-
-       if (!q->mq_ops)
-               return q->fq;
-
-       hctx = q->mq_ops->map_queue(q, ctx->cpu);
-
-       return hctx->fq;
+       if (q->mq_ops)
+               return blk_mq_map_queue(q, ctx->cpu)->fq;
+       return q->fq;
 }
 
 static inline void __blk_get_queue(struct request_queue *q)
@@ -116,6 +111,7 @@ void blk_account_io_done(struct request *req);
 enum rq_atomic_flags {
        REQ_ATOM_COMPLETE = 0,
        REQ_ATOM_STARTED,
+       REQ_ATOM_POLL_SLEPT,
 };
 
 /*
@@ -135,7 +131,7 @@ static inline void blk_clear_rq_complete(struct request *rq)
 /*
  * Internal elevator interface
  */
-#define ELV_ON_HASH(rq) ((rq)->cmd_flags & REQ_HASHED)
+#define ELV_ON_HASH(rq) ((rq)->rq_flags & RQF_HASHED)
 
 void blk_insert_flush(struct request *rq);
 
@@ -252,7 +248,7 @@ extern int blk_update_nr_requests(struct request_queue *, unsigned int);
 static inline int blk_do_io_stat(struct request *rq)
 {
        return rq->rq_disk &&
-              (rq->cmd_flags & REQ_IO_STAT) &&
+              (rq->rq_flags & RQF_IO_STAT) &&
                (rq->cmd_type == REQ_TYPE_FS);
 }