diff options
author | Slava Pestov <sp@daterainc.com> | 2014-05-22 21:14:24 +0200 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2014-08-05 00:23:03 +0200 |
commit | 60ae81eee86dd7a520db8c1e3d702b49fc0418b5 (patch) | |
tree | a9919f11951c3e96ad49db0b50c3964232f5f1b7 /include | |
parent | bcache: fix typo in bch_bkey_equal_header (diff) | |
download | linux-60ae81eee86dd7a520db8c1e3d702b49fc0418b5.tar.xz linux-60ae81eee86dd7a520db8c1e3d702b49fc0418b5.zip |
bcache: bcache_write tracepoint was crashing
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/trace/events/bcache.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/include/trace/events/bcache.h b/include/trace/events/bcache.h index c9c3c044b32f..6778e4135a8e 100644 --- a/include/trace/events/bcache.h +++ b/include/trace/events/bcache.h @@ -148,11 +148,13 @@ TRACE_EVENT(bcache_read, ); TRACE_EVENT(bcache_write, - TP_PROTO(struct bio *bio, bool writeback, bool bypass), - TP_ARGS(bio, writeback, bypass), + TP_PROTO(struct cache_set *c, u64 inode, struct bio *bio, + bool writeback, bool bypass), + TP_ARGS(c, inode, bio, writeback, bypass), TP_STRUCT__entry( - __field(dev_t, dev ) + __array(char, uuid, 16 ) + __field(u64, inode ) __field(sector_t, sector ) __field(unsigned int, nr_sector ) __array(char, rwbs, 6 ) @@ -161,7 +163,8 @@ TRACE_EVENT(bcache_write, ), TP_fast_assign( - __entry->dev = bio->bi_bdev->bd_dev; + memcpy(__entry->uuid, c->sb.set_uuid, 16); + __entry->inode = inode; __entry->sector = bio->bi_iter.bi_sector; __entry->nr_sector = bio->bi_iter.bi_size >> 9; blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_iter.bi_size); @@ -169,8 +172,8 @@ TRACE_EVENT(bcache_write, __entry->bypass = bypass; ), - TP_printk("%d,%d %s %llu + %u hit %u bypass %u", - MAJOR(__entry->dev), MINOR(__entry->dev), + TP_printk("%pU inode %llu %s %llu + %u hit %u bypass %u", + __entry->uuid, __entry->inode, __entry->rwbs, (unsigned long long)__entry->sector, __entry->nr_sector, __entry->writeback, __entry->bypass) ); |