[3.13.y.z extended stable] Patch "blk-mq: fix initializing request's start time" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Tue Sep 2 21:37:14 UTC 2014
This is a note to let you know that I have just added a patch titled
blk-mq: fix initializing request's start time
to the linux-3.13.y-queue branch of the 3.13.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.13.y-queue
This patch is scheduled to be released in version 3.13.11.7.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.13.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From 5da61791517134c58ef1d543b78efa39659236bd Mon Sep 17 00:00:00 2001
From: Ming Lei <tom.leiming at gmail.com>
Date: Fri, 3 Jan 2014 10:00:08 -0700
Subject: blk-mq: fix initializing request's start time
commit 0fec08b4ecfc36fd8a64432343b2964fb86d2675 upstream.
blk_rq_init() is called in req's complete handler to initialize
the request, so the members of start_time and start_time_ns might
become inaccurate when it is allocated in future.
The patch initializes the two members in blk_mq_rq_ctx_init() to
fix the problem.
Signed-off-by: Ming Lei <tom.leiming at gmail.com>
Signed-off-by: Jens Axboe <axboe at kernel.dk>
Cc: Chris J Arges <chris.j.arges at canonical.com>
Cc: Tim Gardner <tim.gardner at canonical.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
block/blk-mq.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 7f9b1f6..2192cf4 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -179,6 +179,8 @@ static void blk_mq_rq_ctx_init(struct request_queue *q, struct blk_mq_ctx *ctx,
rq->mq_ctx = ctx;
rq->cmd_flags = rw_flags;
+ rq->start_time = jiffies;
+ set_start_time_ns(rq);
ctx->rq_dispatched[rw_is_sync(rw_flags)]++;
}
--
1.9.1
More information about the kernel-team
mailing list