Re: [PATCH] virtio_blk: use a wrapper function to access io context information of IO requests

From: Jens Axboe
Date: Thu Aug 14 2008 - 03:58:23 EST


On Thu, Aug 14 2008, Fernando Luis Vázquez Cao wrote:
> 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@xxxxxxxxxxxxx>
> Acked-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>

Fine with me, applied.

--
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/