Merge branch 'for-3.16/blk-mq-tagging' into for-3.16/core
authorJens Axboe <axboe@fb.com>
Sat, 10 May 2014 21:44:42 +0000 (15:44 -0600)
committerJens Axboe <axboe@fb.com>
Sat, 10 May 2014 21:44:42 +0000 (15:44 -0600)
block/blk-core.c
block/blk-mq.c

index c4269701cb4f796a6f48147c943f579621606cd5..a6bd3e702201b3cd8558c76d8ad672e740a39c07 100644 (file)
@@ -1233,12 +1233,15 @@ static void add_acct_request(struct request_queue *q, struct request *rq,
 static void part_round_stats_single(int cpu, struct hd_struct *part,
                                    unsigned long now)
 {
+       int inflight;
+
        if (now == part->stamp)
                return;
 
-       if (part_in_flight(part)) {
+       inflight = part_in_flight(part);
+       if (inflight) {
                __part_stat_add(cpu, part, time_in_queue,
-                               part_in_flight(part) * (now - part->stamp));
+                               inflight * (now - part->stamp));
                __part_stat_add(cpu, part, io_ticks, (now - part->stamp));
        }
        part->stamp = now;
index 9f07a266f7ab1e052cd187558fb1484114bd5ae4..526feee31bffdc9d663438bb84a757793c38fbd6 100644 (file)
@@ -1088,17 +1088,15 @@ static void blk_mq_make_request(struct request_queue *q, struct bio *bio)
        }
 
        if (!(hctx->flags & BLK_MQ_F_SHOULD_MERGE)) {
-               init_request_from_bio(rq, bio);
-
+               blk_mq_bio_to_request(rq, bio);
                spin_lock(&ctx->lock);
 insert_rq:
                __blk_mq_insert_request(hctx, rq, false);
                spin_unlock(&ctx->lock);
-               blk_account_io_start(rq, 1);
        } else {
                spin_lock(&ctx->lock);
                if (!blk_mq_attempt_merge(q, ctx, bio)) {
-                       init_request_from_bio(rq, bio);
+                       blk_mq_bio_to_request(rq, bio);
                        goto insert_rq;
                }