[RFC patch 1/5] trace event block fix unassigned field

From: Mathieu Desnoyers
Date: Tue Jan 04 2011 - 18:51:29 EST


The "error" field in block_bio_complete is not assigned, leaving the memory area
uninitialized (keeping garbage data). Initialize it to 0.

We should eventually remove this field when we find out if blktrace can live
without it.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>
CC: Steven Rostedt <rostedt@xxxxxxxxxxx>
CC: Frederic Weisbecker <fweisbec@xxxxxxxxx>
CC: Ingo Molnar <mingo@xxxxxxx>
CC: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CC: Jeff Moyer <jmoyer@xxxxxxxxxx>
CC: Jens Axboe <jens.axboe@xxxxxxxxxx>
CC: Li Zefan <lizf@xxxxxxxxxxxxxx>
CC: Alan.Brunelle@xxxxxx
---
include/trace/events/block.h | 1 +
1 file changed, 1 insertion(+)

Index: linux-2.6-lttng/include/trace/events/block.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/block.h
+++ linux-2.6-lttng/include/trace/events/block.h
@@ -228,6 +228,7 @@ TRACE_EVENT(block_bio_complete,
__entry->dev = bio->bi_bdev->bd_dev;
__entry->sector = bio->bi_sector;
__entry->nr_sector = bio->bi_size >> 9;
+ __entry->error = 0;
blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size);
),


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/