mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
block: fix inconsistency in I/O stat accounting code
This forces in_flight to be zero when turning off or on the I/O stat accounting and stops updating I/O stats in attempt_merge() when accounting is turned off. Signed-off-by: Jerome Marchand <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
6c7e8cee6a
commit
26308eab69
6 changed files with 33 additions and 26 deletions
10
block/blk.h
10
block/blk.h
|
|
@ -112,12 +112,14 @@ static inline int blk_cpu_to_group(int cpu)
|
|||
#endif
|
||||
}
|
||||
|
||||
static inline int blk_do_io_stat(struct request_queue *q)
|
||||
static inline int blk_do_io_stat(struct request *rq)
|
||||
{
|
||||
if (q)
|
||||
return blk_queue_io_stat(q);
|
||||
struct gendisk *disk = rq->rq_disk;
|
||||
|
||||
return 0;
|
||||
if (!disk || !disk->queue)
|
||||
return 0;
|
||||
|
||||
return blk_queue_io_stat(disk->queue) && (rq->cmd_flags & REQ_ELVPRIV);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue