mg_disk: dequeue and track in-flight request
authorTejun Heo <tj@kernel.org>
Fri, 8 May 2009 02:54:01 +0000 (11:54 +0900)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 11 May 2009 07:52:15 +0000 (09:52 +0200)
commit5b36ad6000ddea390aca3c3b67ead7616ace2ffc
treededca03fffd6729487fbd9bc3959428038e0cdfb
parent9a8d23d8855e554fc5887f14cb008b55c4300ccc
mg_disk: dequeue and track in-flight request

mg_disk has at most single request in flight per device.  Till now,
whenever it needs to access the in-flight request it called
elv_next_request().  This patch makes mg_disk track the in-flight
request directly using mg_host->req and dequeue it when processing
starts.

q->queuedata is set to mg_host so that mg_host can be determined
without fetching request from the queue.

[ Impact: dequeue in-flight request, one elv_next_request() per request ]

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: unsik Kim <donari75@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
drivers/block/mg_disk.c