Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "block: add missing block_bio_complete() tracepoint"

This reverts commit 3a366e614d0837d9fc23f78cdb1a1186ebc3387f.

Wanlong Gao reports that it causes a kernel panic on his machine several
minutes after boot. Reverting it removes the panic.

Jens says:
"It's not quite clear why that is yet, so I think we should just revert
the commit for 3.9 final (which I'm assuming is pretty close).

The wifi is crap at the LSF hotel, so sending this email instead of
queueing up a revert and pull request."

Reported-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Requested-by: Jens Axboe <axboe@kernel.dk>
Cc: Tejun Heo <tj@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+19 -31
+1
block/blk-core.c
··· 39 39 40 40 EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_remap); 41 41 EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_remap); 42 + EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_complete); 42 43 EXPORT_TRACEPOINT_SYMBOL_GPL(block_unplug); 43 44 44 45 DEFINE_IDA(blk_queue_ida);
+1
drivers/md/dm.c
··· 611 611 queue_io(md, bio); 612 612 } else { 613 613 /* done with normal IO or empty flush */ 614 + trace_block_bio_complete(md->queue, bio, io_error); 614 615 bio_endio(bio, io_error); 615 616 } 616 617 }
+10 -1
drivers/md/raid5.c
··· 184 184 return_bi = bi->bi_next; 185 185 bi->bi_next = NULL; 186 186 bi->bi_size = 0; 187 + trace_block_bio_complete(bdev_get_queue(bi->bi_bdev), 188 + bi, 0); 187 189 bio_endio(bi, 0); 188 190 bi = return_bi; 189 191 } ··· 3916 3914 rdev_dec_pending(rdev, conf->mddev); 3917 3915 3918 3916 if (!error && uptodate) { 3917 + trace_block_bio_complete(bdev_get_queue(raid_bi->bi_bdev), 3918 + raid_bi, 0); 3919 3919 bio_endio(raid_bi, 0); 3920 3920 if (atomic_dec_and_test(&conf->active_aligned_reads)) 3921 3921 wake_up(&conf->wait_for_stripe); ··· 4386 4382 if ( rw == WRITE ) 4387 4383 md_write_end(mddev); 4388 4384 4385 + trace_block_bio_complete(bdev_get_queue(bi->bi_bdev), 4386 + bi, 0); 4389 4387 bio_endio(bi, 0); 4390 4388 } 4391 4389 } ··· 4764 4758 handled++; 4765 4759 } 4766 4760 remaining = raid5_dec_bi_active_stripes(raid_bio); 4767 - if (remaining == 0) 4761 + if (remaining == 0) { 4762 + trace_block_bio_complete(bdev_get_queue(raid_bio->bi_bdev), 4763 + raid_bio, 0); 4768 4764 bio_endio(raid_bio, 0); 4765 + } 4769 4766 if (atomic_dec_and_test(&conf->active_aligned_reads)) 4770 4767 wake_up(&conf->wait_for_stripe); 4771 4768 return handled;
-2
fs/bio.c
··· 1428 1428 else if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) 1429 1429 error = -EIO; 1430 1430 1431 - trace_block_bio_complete(bio, error); 1432 - 1433 1431 if (bio->bi_end_io) 1434 1432 bio->bi_end_io(bio, error); 1435 1433 }
-1
include/linux/blktrace_api.h
··· 12 12 13 13 struct blk_trace { 14 14 int trace_state; 15 - bool rq_based; 16 15 struct rchan *rchan; 17 16 unsigned long __percpu *sequence; 18 17 unsigned char __percpu *msg_data;
+4 -4
include/trace/events/block.h
··· 257 257 258 258 /** 259 259 * block_bio_complete - completed all work on the block operation 260 + * @q: queue holding the block operation 260 261 * @bio: block operation completed 261 262 * @error: io error value 262 263 * ··· 266 265 */ 267 266 TRACE_EVENT(block_bio_complete, 268 267 269 - TP_PROTO(struct bio *bio, int error), 268 + TP_PROTO(struct request_queue *q, struct bio *bio, int error), 270 269 271 - TP_ARGS(bio, error), 270 + TP_ARGS(q, bio, error), 272 271 273 272 TP_STRUCT__entry( 274 273 __field( dev_t, dev ) ··· 279 278 ), 280 279 281 280 TP_fast_assign( 282 - __entry->dev = bio->bi_bdev ? 283 - bio->bi_bdev->bd_dev : 0; 281 + __entry->dev = bio->bi_bdev->bd_dev; 284 282 __entry->sector = bio->bi_sector; 285 283 __entry->nr_sector = bio->bi_size >> 9; 286 284 __entry->error = error;
+3 -23
kernel/trace/blktrace.c
··· 739 739 struct request_queue *q, 740 740 struct request *rq) 741 741 { 742 - struct blk_trace *bt = q->blk_trace; 743 - 744 - /* if control ever passes through here, it's a request based driver */ 745 - if (unlikely(bt && !bt->rq_based)) 746 - bt->rq_based = true; 747 - 748 742 blk_add_trace_rq(q, rq, BLK_TA_COMPLETE); 749 743 } 750 744 ··· 774 780 blk_add_trace_bio(q, bio, BLK_TA_BOUNCE, 0); 775 781 } 776 782 777 - static void blk_add_trace_bio_complete(void *ignore, struct bio *bio, int error) 783 + static void blk_add_trace_bio_complete(void *ignore, 784 + struct request_queue *q, struct bio *bio, 785 + int error) 778 786 { 779 - struct request_queue *q; 780 - struct blk_trace *bt; 781 - 782 - if (!bio->bi_bdev) 783 - return; 784 - 785 - q = bdev_get_queue(bio->bi_bdev); 786 - bt = q->blk_trace; 787 - 788 - /* 789 - * Request based drivers will generate both rq and bio completions. 790 - * Ignore bio ones. 791 - */ 792 - if (likely(!bt) || bt->rq_based) 793 - return; 794 - 795 787 blk_add_trace_bio(q, bio, BLK_TA_COMPLETE, error); 796 788 } 797 789