aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/dm.c2
-rw-r--r--include/trace/events/block.h6
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 0a2b5516bc21..f48a2f359ac4 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -630,7 +630,7 @@ static void dec_pending(struct dm_io *io, int error)
630 queue_io(md, bio); 630 queue_io(md, bio);
631 } else { 631 } else {
632 /* done with normal IO or empty flush */ 632 /* done with normal IO or empty flush */
633 trace_block_bio_complete(md->queue, bio); 633 trace_block_bio_complete(md->queue, bio, io_error);
634 bio_endio(bio, io_error); 634 bio_endio(bio, io_error);
635 } 635 }
636 } 636 }
diff --git a/include/trace/events/block.h b/include/trace/events/block.h
index b56c65dc105d..aba421d68f6f 100644
--- a/include/trace/events/block.h
+++ b/include/trace/events/block.h
@@ -206,15 +206,16 @@ TRACE_EVENT(block_bio_bounce,
206 * block_bio_complete - completed all work on the block operation 206 * block_bio_complete - completed all work on the block operation
207 * @q: queue holding the block operation 207 * @q: queue holding the block operation
208 * @bio: block operation completed 208 * @bio: block operation completed
209 * @error: io error value
209 * 210 *
210 * This tracepoint indicates there is no further work to do on this 211 * This tracepoint indicates there is no further work to do on this
211 * block IO operation @bio. 212 * block IO operation @bio.
212 */ 213 */
213TRACE_EVENT(block_bio_complete, 214TRACE_EVENT(block_bio_complete,
214 215
215 TP_PROTO(struct request_queue *q, struct bio *bio), 216 TP_PROTO(struct request_queue *q, struct bio *bio, int error),
216 217
217 TP_ARGS(q, bio), 218 TP_ARGS(q, bio, error),
218 219
219 TP_STRUCT__entry( 220 TP_STRUCT__entry(
220 __field( dev_t, dev ) 221 __field( dev_t, dev )
@@ -228,6 +229,7 @@ TRACE_EVENT(block_bio_complete,
228 __entry->dev = bio->bi_bdev->bd_dev; 229 __entry->dev = bio->bi_bdev->bd_dev;
229 __entry->sector = bio->bi_sector; 230 __entry->sector = bio->bi_sector;
230 __entry->nr_sector = bio->bi_size >> 9; 231 __entry->nr_sector = bio->bi_size >> 9;
232 __entry->error = error;
231 blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); 233 blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size);
232 ), 234 ),
233 235