aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2013-03-19 13:16:57 -0400
committerJens Axboe <axboe@kernel.dk>2013-03-23 00:18:09 -0400
commit7e8c288f6cde950a6ca001ec06a32c8c2cf4180e (patch)
treeb8d6582b3dc188f6a6d49566f912cd59770a2bfa /drivers/block/drbd
parent08a1ddab6df7d3c7b6341774cb1cf4b21b96a214 (diff)
drbd: move start io accounting before activity log transaction
The IO accounting of the drbd "queue depth" was misleading. We only started IO accounting once we already wrote the activity log. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r--drivers/block/drbd/drbd_req.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index b923d41678e1..d72f2fef1cba 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -1056,6 +1056,9 @@ drbd_request_prepare(struct drbd_conf *mdev, struct bio *bio, unsigned long star
1056 req->private_bio = NULL; 1056 req->private_bio = NULL;
1057 } 1057 }
1058 1058
1059 /* Update disk stats */
1060 _drbd_start_io_acct(mdev, req);
1061
1059 if (rw == WRITE && req->private_bio && req->i.size 1062 if (rw == WRITE && req->private_bio && req->i.size
1060 && !test_bit(AL_SUSPENDED, &mdev->flags)) { 1063 && !test_bit(AL_SUSPENDED, &mdev->flags)) {
1061 if (!drbd_al_begin_io_fastpath(mdev, &req->i)) { 1064 if (!drbd_al_begin_io_fastpath(mdev, &req->i)) {
@@ -1095,9 +1098,6 @@ static void drbd_send_and_submit(struct drbd_conf *mdev, struct drbd_request *re
1095 goto out; 1098 goto out;
1096 } 1099 }
1097 1100
1098 /* Update disk stats */
1099 _drbd_start_io_acct(mdev, req);
1100
1101 /* We fail READ/READA early, if we can not serve it. 1101 /* We fail READ/READA early, if we can not serve it.
1102 * We must do this before req is registered on any lists. 1102 * We must do this before req is registered on any lists.
1103 * Otherwise, drbd_req_complete() will queue failed READ for retry. */ 1103 * Otherwise, drbd_req_complete() will queue failed READ for retry. */