Re: [PATCH linux-2.6-block/for-linus] Fix discard requestsaccounting in the diskstats

From: Jens Axboe
Date: Fri Apr 24 2009 - 02:15:31 EST


On Fri, Apr 24 2009, Nikanth Karthikesan wrote:
> When 2 discard requests are merged, the stats gets updated, but we do not
> update statistics normally when a discard request is issued or completed. For
> example the in_flight counter would be decremented when 2 discard requests are
> merged, but it was not at all incremented when they were issued, and in_flight
> counter will not be decremented, when they are completed as well.
>
> This patch fixes this by adding discard requests to the statistics.
>
> Signed-off-by: Nikanth Karthikesan <knikanth@xxxxxxx>

OK, so that's not quite what I had in mind. If we first do this as a
preparatory patch:

http://git.kernel.dk/?p=linux-2.6-block.git;a=commit;h=42fd769da4edadad83a779867ff1910ec35c6de7

then the discard fix becomes this one-liner:

http://git.kernel.dk/?p=linux-2.6-block.git;a=commit;h=999ae79ae7f853bb9e60e95753ebf8d1628e632a

--
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/