diff options
author | Chetan Loke <loke.chetan@gmail.com> | 2012-07-31 08:47:13 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-07-31 08:47:13 +0200 |
commit | 01ff5dbc0925d11c8ad76eed3bdd02d0c7e1e0f5 (patch) | |
tree | 962e8fd1136191e31502dbe5e136b6900a3b2012 /drivers | |
parent | 72ea1f74fcdf874cca6d2c0962379523bbd99e2c (diff) |
block/nbd: micro-optimization in nbd request completion
Add in-flight cmds to the tail. That way while searching
(during request completion),we will always get a hit on the
first element.
Signed-off-by: Chetan Loke <loke.chetan@gmail.com>
Acked-by: Paul.Clements@steeleye.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/nbd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 061427a75d37..8957b9f0cfad 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -481,7 +481,7 @@ static void nbd_handle_req(struct nbd_device *nbd, struct request *req) nbd_end_request(req); } else { spin_lock(&nbd->queue_lock); - list_add(&req->queuelist, &nbd->queue_head); + list_add_tail(&req->queuelist, &nbd->queue_head); spin_unlock(&nbd->queue_lock); } |