diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-22 18:00:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-22 18:00:11 -0400 |
commit | 68cf8d0c720cdb76dc912c983d8dae9de6d6e5cf (patch) | |
tree | 41779dfce5cae3dc495f27f76ed8e66dd046ac4c /include | |
parent | 0fbf2cc983ca15208545010863c6536d36a25f3a (diff) | |
parent | f3cff25f05f2ac29b2ee355e611b0657482f6f1d (diff) |
Merge branch 'for-3.12/core' of git://git.kernel.dk/linux-block
Pull block IO fixes from Jens Axboe:
"After merge window, no new stuff this time only a collection of neatly
confined and simple fixes"
* 'for-3.12/core' of git://git.kernel.dk/linux-block:
cfq: explicitly use 64bit divide operation for 64bit arguments
block: Add nr_bios to block_rq_remap tracepoint
If the queue is dying then we only call the rq->end_io callout. This leaves bios setup on the request, because the caller assumes when the blk_execute_rq_nowait/blk_execute_rq call has completed that the rq->bios have been cleaned up.
bio-integrity: Fix use of bs->bio_integrity_pool after free
blkcg: relocate root_blkg setting and clearing
block: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node(...)
block: trace all devices plug operation
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blkdev.h | 11 | ||||
-rw-r--r-- | include/trace/events/block.h | 6 |
2 files changed, 15 insertions, 2 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) | |||
862 | return blk_queue_get_max_sectors(q, rq->cmd_flags); | 862 | return blk_queue_get_max_sectors(q, rq->cmd_flags); |
863 | } | 863 | } |
864 | 864 | ||
865 | static inline unsigned int blk_rq_count_bios(struct request *rq) | ||
866 | { | ||
867 | unsigned int nr_bios = 0; | ||
868 | struct bio *bio; | ||
869 | |||
870 | __rq_for_each_bio(bio, rq) | ||
871 | nr_bios++; | ||
872 | |||
873 | return nr_bios; | ||
874 | } | ||
875 | |||
865 | /* | 876 | /* |
866 | * Request issue related functions. | 877 | * Request issue related functions. |
867 | */ | 878 | */ |
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index 60ae7c3db912..4c2301d2ef1a 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
@@ -618,6 +618,7 @@ TRACE_EVENT(block_rq_remap, | |||
618 | __field( unsigned int, nr_sector ) | 618 | __field( unsigned int, nr_sector ) |
619 | __field( dev_t, old_dev ) | 619 | __field( dev_t, old_dev ) |
620 | __field( sector_t, old_sector ) | 620 | __field( sector_t, old_sector ) |
621 | __field( unsigned int, nr_bios ) | ||
621 | __array( char, rwbs, RWBS_LEN) | 622 | __array( char, rwbs, RWBS_LEN) |
622 | ), | 623 | ), |
623 | 624 | ||
@@ -627,15 +628,16 @@ TRACE_EVENT(block_rq_remap, | |||
627 | __entry->nr_sector = blk_rq_sectors(rq); | 628 | __entry->nr_sector = blk_rq_sectors(rq); |
628 | __entry->old_dev = dev; | 629 | __entry->old_dev = dev; |
629 | __entry->old_sector = from; | 630 | __entry->old_sector = from; |
631 | __entry->nr_bios = blk_rq_count_bios(rq); | ||
630 | blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq)); | 632 | blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq)); |
631 | ), | 633 | ), |
632 | 634 | ||
633 | TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu", | 635 | TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu %u", |
634 | MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, | 636 | MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, |
635 | (unsigned long long)__entry->sector, | 637 | (unsigned long long)__entry->sector, |
636 | __entry->nr_sector, | 638 | __entry->nr_sector, |
637 | MAJOR(__entry->old_dev), MINOR(__entry->old_dev), | 639 | MAJOR(__entry->old_dev), MINOR(__entry->old_dev), |
638 | (unsigned long long)__entry->old_sector) | 640 | (unsigned long long)__entry->old_sector, __entry->nr_bios) |
639 | ); | 641 | ); |
640 | 642 | ||
641 | #endif /* _TRACE_BLOCK_H */ | 643 | #endif /* _TRACE_BLOCK_H */ |