diff options
| author | Ingo Molnar <mingo@kernel.org> | 2013-10-04 09:59:13 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2013-10-04 09:59:13 +0200 |
| commit | fafd883f671dfc1c2f62009179920f27abc784a1 (patch) | |
| tree | 0eccb0baf343cad79a54e352598921db9ca17620 /include/linux/blkdev.h | |
| parent | 92519bbc8af612975410def52bd462ca9af85cdb (diff) | |
| parent | d8b11a0cbd1c66ce283eb9dabe0498dfa6483f32 (diff) | |
Merge branch 'perf/urgent' into perf/core
Pick up the latest fixes before applying new patches.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/blkdev.h')
| -rw-r--r-- | include/linux/blkdev.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 2fdb4a451b49..0e6f765aa1f5 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -862,6 +862,17 @@ static inline unsigned int blk_rq_get_max_sectors(struct request *rq) return blk_queue_get_max_sectors(q, rq->cmd_flags); } +static inline unsigned int blk_rq_count_bios(struct request *rq) +{ + unsigned int nr_bios = 0; + struct bio *bio; + + __rq_for_each_bio(bio, rq) + nr_bios++; + + return nr_bios; +} + /* * Request issue related functions. */ |
