diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-04-24 08:10:11 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-04-28 07:37:37 +0200 |
commit | c2553b5844b06910435e40cfab9e6f384840cb97 (patch) | |
tree | 00a6a1f0c056f19050a8b7c7a1db7b7e0e502062 /block/blk.h | |
parent | 731ec497e5888c6792ad62613ae9be97eebcd7ca (diff) | |
download | kernel_samsung_smdk4412-c2553b5844b06910435e40cfab9e6f384840cb97.zip kernel_samsung_smdk4412-c2553b5844b06910435e40cfab9e6f384840cb97.tar.gz kernel_samsung_smdk4412-c2553b5844b06910435e40cfab9e6f384840cb97.tar.bz2 |
block: make blk_do_io_stat() do the full "is this rq accountable" checks
We currently check for file system requests outside of blk_do_io_stat(rq),
but we may as well just include it.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk.h')
-rw-r--r-- | block/blk.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/block/blk.h b/block/blk.h index 9b2c324..404c10b 100644 --- a/block/blk.h +++ b/block/blk.h @@ -149,9 +149,16 @@ static inline int blk_cpu_to_group(int cpu) #endif } +/* + * Contribute to IO statistics IFF: + * + * a) it's attached to a gendisk, and + * b) the queue had IO stats enabled when this request was started, and + * c) it's a file system request + */ static inline int blk_do_io_stat(struct request *rq) { - return rq->rq_disk && blk_rq_io_stat(rq); + return rq->rq_disk && blk_rq_io_stat(rq) && blk_fs_request(rq); } #endif |