On Mon, May 04, 2020 at 04:31:04PM +0300, Konstantin Khlebnikov wrote:
> Move non-"new_io" branch of blk_account_io_start() into separate function.
> Fix merge accounting for discards (they were counted as write merges).
> 
> Also blk_account_io_merge_bio() doesn't call update_io_ticks() unlike to
> blk_account_io_start(), there is no reason for that.
> 
> Signed-off-by: Konstantin Khlebnikov <khlebni...@yandex-team.ru>

Looks good,

Reviewed-by: Christoph Hellwig <h...@lst.de>

Nitpick below:

> +void blk_account_io_start(struct request *rq)
>  {
>       struct hd_struct *part;
>       int rw = rq_data_dir(rq);
>  
> +     if (blk_do_io_stat(rq)) {

part and rw probably should move inside this branch.

Reply via email to