]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_blk: use a wrapper function to access io context information of IO requests
authorFernando Luis Vázquez Cao <fernando@oss.ntt.co.jp>
Thu, 14 Aug 2008 07:59:13 +0000 (09:59 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 9 Oct 2008 06:56:02 +0000 (08:56 +0200)
commit0725a8cfa192505555b67c02674d29eb0bb7e616
treeddf5f709a4a0c67aabd4af5166f8735d5228d671
parentc1ba4bb7e9d4b6a6566f04b7640d8f5873d81ca0
virtio_blk: use a wrapper function to access io context information of IO requests

struct request has an ioprio member but it is never updated because
currently bios do not hold io context information. The implication of
this is that virtio_blk ends up passing useless information to the
backend driver.

That said, some IO schedulers such as CFQ do store io context
information in struct request, but use private members for that, which
means that that information cannot be directly accessed in a IO
scheduler-independent way.

This patch adds a function to obtain the ioprio of a request. We should
avoid accessing ioprio directly and use this function instead, so that
its users do not have to care about future changes in block layer
structures or what the currently active IO controller is.

This patch does not introduce any functional changes but paves the way
for future clean-ups and enhancements.

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
drivers/block/virtio_blk.c
include/linux/blkdev.h