diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-08 14:51:05 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-08 14:51:05 -0400 |
| commit | ebb37277796269da36a8bc5d72ed1e8e1fb7d34b (patch) | |
| tree | 0ded627a62a5cec70b18d12825dd858855c135d3 /include/trace | |
| parent | 4de13d7aa8f4d02f4dc99d4609575659f92b3c5a (diff) | |
| parent | f50efd2fdbd9b35b11f5778ed85beb764184bda9 (diff) | |
Merge branch 'for-3.10/drivers' of git://git.kernel.dk/linux-block
Pull block driver updates from Jens Axboe:
"It might look big in volume, but when categorized, not a lot of
drivers are touched. The pull request contains:
- mtip32xx fixes from Micron.
- A slew of drbd updates, this time in a nicer series.
- bcache, a flash/ssd caching framework from Kent.
- Fixes for cciss"
* 'for-3.10/drivers' of git://git.kernel.dk/linux-block: (66 commits)
bcache: Use bd_link_disk_holder()
bcache: Allocator cleanup/fixes
cciss: bug fix to prevent cciss from loading in kdump crash kernel
cciss: add cciss_allow_hpsa module parameter
drivers/block/mg_disk.c: add CONFIG_PM_SLEEP to suspend/resume functions
mtip32xx: Workaround for unaligned writes
bcache: Make sure blocksize isn't smaller than device blocksize
bcache: Fix merge_bvec_fn usage for when it modifies the bvm
bcache: Correctly check against BIO_MAX_PAGES
bcache: Hack around stuff that clones up to bi_max_vecs
bcache: Set ra_pages based on backing device's ra_pages
bcache: Take data offset from the bdev superblock.
mtip32xx: mtip32xx: Disable TRIM support
mtip32xx: fix a smatch warning
bcache: Disable broken btree fuzz tester
bcache: Fix a format string overflow
bcache: Fix a minor memory leak on device teardown
bcache: Documentation updates
bcache: Use WARN_ONCE() instead of __WARN()
bcache: Add missing #include <linux/prefetch.h>
...
Diffstat (limited to 'include/trace')
| -rw-r--r-- | include/trace/events/bcache.h | 271 |
1 files changed, 271 insertions, 0 deletions
diff --git a/include/trace/events/bcache.h b/include/trace/events/bcache.h new file mode 100644 index 000000000000..3cc5a0b278c3 --- /dev/null +++ b/include/trace/events/bcache.h | |||
| @@ -0,0 +1,271 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM bcache | ||
| 3 | |||
| 4 | #if !defined(_TRACE_BCACHE_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_BCACHE_H | ||
| 6 | |||
| 7 | #include <linux/tracepoint.h> | ||
| 8 | |||
| 9 | struct search; | ||
| 10 | |||
| 11 | DECLARE_EVENT_CLASS(bcache_request, | ||
| 12 | |||
| 13 | TP_PROTO(struct search *s, struct bio *bio), | ||
| 14 | |||
| 15 | TP_ARGS(s, bio), | ||
| 16 | |||
| 17 | TP_STRUCT__entry( | ||
| 18 | __field(dev_t, dev ) | ||
| 19 | __field(unsigned int, orig_major ) | ||
| 20 | __field(unsigned int, orig_minor ) | ||
| 21 | __field(sector_t, sector ) | ||
| 22 | __field(dev_t, orig_sector ) | ||
| 23 | __field(unsigned int, nr_sector ) | ||
| 24 | __array(char, rwbs, 6 ) | ||
| 25 | __array(char, comm, TASK_COMM_LEN ) | ||
| 26 | ), | ||
| 27 | |||
| 28 | TP_fast_assign( | ||
| 29 | __entry->dev = bio->bi_bdev->bd_dev; | ||
| 30 | __entry->orig_major = s->d->disk->major; | ||
| 31 | __entry->orig_minor = s->d->disk->first_minor; | ||
| 32 | __entry->sector = bio->bi_sector; | ||
| 33 | __entry->orig_sector = bio->bi_sector - 16; | ||
| 34 | __entry->nr_sector = bio->bi_size >> 9; | ||
| 35 | blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); | ||
| 36 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); | ||
| 37 | ), | ||
| 38 | |||
| 39 | TP_printk("%d,%d %s %llu + %u [%s] (from %d,%d @ %llu)", | ||
| 40 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 41 | __entry->rwbs, | ||
| 42 | (unsigned long long)__entry->sector, | ||
| 43 | __entry->nr_sector, __entry->comm, | ||
| 44 | __entry->orig_major, __entry->orig_minor, | ||
| 45 | (unsigned long long)__entry->orig_sector) | ||
| 46 | ); | ||
| 47 | |||
| 48 | DEFINE_EVENT(bcache_request, bcache_request_start, | ||
| 49 | |||
| 50 | TP_PROTO(struct search *s, struct bio *bio), | ||
| 51 | |||
| 52 | TP_ARGS(s, bio) | ||
| 53 | ); | ||
| 54 | |||
| 55 | DEFINE_EVENT(bcache_request, bcache_request_end, | ||
| 56 | |||
| 57 | TP_PROTO(struct search *s, struct bio *bio), | ||
| 58 | |||
| 59 | TP_ARGS(s, bio) | ||
| 60 | ); | ||
| 61 | |||
| 62 | DECLARE_EVENT_CLASS(bcache_bio, | ||
| 63 | |||
| 64 | TP_PROTO(struct bio *bio), | ||
| 65 | |||
| 66 | TP_ARGS(bio), | ||
| 67 | |||
| 68 | TP_STRUCT__entry( | ||
| 69 | __field(dev_t, dev ) | ||
| 70 | __field(sector_t, sector ) | ||
| 71 | __field(unsigned int, nr_sector ) | ||
| 72 | __array(char, rwbs, 6 ) | ||
| 73 | __array(char, comm, TASK_COMM_LEN ) | ||
| 74 | ), | ||
| 75 | |||
| 76 | TP_fast_assign( | ||
| 77 | __entry->dev = bio->bi_bdev->bd_dev; | ||
| 78 | __entry->sector = bio->bi_sector; | ||
| 79 | __entry->nr_sector = bio->bi_size >> 9; | ||
| 80 | blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); | ||
| 81 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); | ||
| 82 | ), | ||
| 83 | |||
| 84 | TP_printk("%d,%d %s %llu + %u [%s]", | ||
| 85 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 86 | __entry->rwbs, | ||
| 87 | (unsigned long long)__entry->sector, | ||
| 88 | __entry->nr_sector, __entry->comm) | ||
| 89 | ); | ||
| 90 | |||
| 91 | |||
| 92 | DEFINE_EVENT(bcache_bio, bcache_passthrough, | ||
| 93 | |||
| 94 | TP_PROTO(struct bio *bio), | ||
| 95 | |||
| 96 | TP_ARGS(bio) | ||
| 97 | ); | ||
| 98 | |||
| 99 | DEFINE_EVENT(bcache_bio, bcache_cache_hit, | ||
| 100 | |||
| 101 | TP_PROTO(struct bio *bio), | ||
| 102 | |||
| 103 | TP_ARGS(bio) | ||
| 104 | ); | ||
| 105 | |||
| 106 | DEFINE_EVENT(bcache_bio, bcache_cache_miss, | ||
| 107 | |||
| 108 | TP_PROTO(struct bio *bio), | ||
| 109 | |||
| 110 | TP_ARGS(bio) | ||
| 111 | ); | ||
| 112 | |||
| 113 | DEFINE_EVENT(bcache_bio, bcache_read_retry, | ||
| 114 | |||
| 115 | TP_PROTO(struct bio *bio), | ||
| 116 | |||
| 117 | TP_ARGS(bio) | ||
| 118 | ); | ||
| 119 | |||
| 120 | DEFINE_EVENT(bcache_bio, bcache_writethrough, | ||
| 121 | |||
| 122 | TP_PROTO(struct bio *bio), | ||
| 123 | |||
| 124 | TP_ARGS(bio) | ||
| 125 | ); | ||
| 126 | |||
| 127 | DEFINE_EVENT(bcache_bio, bcache_writeback, | ||
| 128 | |||
| 129 | TP_PROTO(struct bio *bio), | ||
| 130 | |||
| 131 | TP_ARGS(bio) | ||
| 132 | ); | ||
| 133 | |||
| 134 | DEFINE_EVENT(bcache_bio, bcache_write_skip, | ||
| 135 | |||
| 136 | TP_PROTO(struct bio *bio), | ||
| 137 | |||
| 138 | TP_ARGS(bio) | ||
| 139 | ); | ||
| 140 | |||
| 141 | DEFINE_EVENT(bcache_bio, bcache_btree_read, | ||
| 142 | |||
| 143 | TP_PROTO(struct bio *bio), | ||
| 144 | |||
| 145 | TP_ARGS(bio) | ||
| 146 | ); | ||
| 147 | |||
| 148 | DEFINE_EVENT(bcache_bio, bcache_btree_write, | ||
| 149 | |||
| 150 | TP_PROTO(struct bio *bio), | ||
| 151 | |||
| 152 | TP_ARGS(bio) | ||
| 153 | ); | ||
| 154 | |||
| 155 | DEFINE_EVENT(bcache_bio, bcache_write_dirty, | ||
| 156 | |||
| 157 | TP_PROTO(struct bio *bio), | ||
| 158 | |||
| 159 | TP_ARGS(bio) | ||
| 160 | ); | ||
| 161 | |||
| 162 | DEFINE_EVENT(bcache_bio, bcache_read_dirty, | ||
| 163 | |||
| 164 | TP_PROTO(struct bio *bio), | ||
| 165 | |||
| 166 | TP_ARGS(bio) | ||
| 167 | ); | ||
| 168 | |||
| 169 | DEFINE_EVENT(bcache_bio, bcache_write_moving, | ||
| 170 | |||
| 171 | TP_PROTO(struct bio *bio), | ||
| 172 | |||
| 173 | TP_ARGS(bio) | ||
| 174 | ); | ||
| 175 | |||
| 176 | DEFINE_EVENT(bcache_bio, bcache_read_moving, | ||
| 177 | |||
| 178 | TP_PROTO(struct bio *bio), | ||
| 179 | |||
| 180 | TP_ARGS(bio) | ||
| 181 | ); | ||
| 182 | |||
| 183 | DEFINE_EVENT(bcache_bio, bcache_journal_write, | ||
| 184 | |||
| 185 | TP_PROTO(struct bio *bio), | ||
| 186 | |||
| 187 | TP_ARGS(bio) | ||
| 188 | ); | ||
| 189 | |||
| 190 | DECLARE_EVENT_CLASS(bcache_cache_bio, | ||
| 191 | |||
| 192 | TP_PROTO(struct bio *bio, | ||
| 193 | sector_t orig_sector, | ||
| 194 | struct block_device* orig_bdev), | ||
| 195 | |||
| 196 | TP_ARGS(bio, orig_sector, orig_bdev), | ||
| 197 | |||
| 198 | TP_STRUCT__entry( | ||
| 199 | __field(dev_t, dev ) | ||
| 200 | __field(dev_t, orig_dev ) | ||
| 201 | __field(sector_t, sector ) | ||
| 202 | __field(sector_t, orig_sector ) | ||
| 203 | __field(unsigned int, nr_sector ) | ||
| 204 | __array(char, rwbs, 6 ) | ||
| 205 | __array(char, comm, TASK_COMM_LEN ) | ||
| 206 | ), | ||
| 207 | |||
| 208 | TP_fast_assign( | ||
| 209 | __entry->dev = bio->bi_bdev->bd_dev; | ||
| 210 | __entry->orig_dev = orig_bdev->bd_dev; | ||
| 211 | __entry->sector = bio->bi_sector; | ||
| 212 | __entry->orig_sector = orig_sector; | ||
| 213 | __entry->nr_sector = bio->bi_size >> 9; | ||
| 214 | blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); | ||
| 215 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); | ||
| 216 | ), | ||
| 217 | |||
| 218 | TP_printk("%d,%d %s %llu + %u [%s] (from %d,%d %llu)", | ||
| 219 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 220 | __entry->rwbs, | ||
| 221 | (unsigned long long)__entry->sector, | ||
| 222 | __entry->nr_sector, __entry->comm, | ||
| 223 | MAJOR(__entry->orig_dev), MINOR(__entry->orig_dev), | ||
| 224 | (unsigned long long)__entry->orig_sector) | ||
| 225 | ); | ||
| 226 | |||
| 227 | DEFINE_EVENT(bcache_cache_bio, bcache_cache_insert, | ||
| 228 | |||
| 229 | TP_PROTO(struct bio *bio, | ||
| 230 | sector_t orig_sector, | ||
| 231 | struct block_device *orig_bdev), | ||
| 232 | |||
| 233 | TP_ARGS(bio, orig_sector, orig_bdev) | ||
| 234 | ); | ||
| 235 | |||
| 236 | DECLARE_EVENT_CLASS(bcache_gc, | ||
| 237 | |||
| 238 | TP_PROTO(uint8_t *uuid), | ||
| 239 | |||
| 240 | TP_ARGS(uuid), | ||
| 241 | |||
| 242 | TP_STRUCT__entry( | ||
| 243 | __field(uint8_t *, uuid) | ||
| 244 | ), | ||
| 245 | |||
| 246 | TP_fast_assign( | ||
| 247 | __entry->uuid = uuid; | ||
| 248 | ), | ||
| 249 | |||
| 250 | TP_printk("%pU", __entry->uuid) | ||
| 251 | ); | ||
| 252 | |||
| 253 | |||
| 254 | DEFINE_EVENT(bcache_gc, bcache_gc_start, | ||
| 255 | |||
| 256 | TP_PROTO(uint8_t *uuid), | ||
| 257 | |||
| 258 | TP_ARGS(uuid) | ||
| 259 | ); | ||
| 260 | |||
| 261 | DEFINE_EVENT(bcache_gc, bcache_gc_end, | ||
| 262 | |||
| 263 | TP_PROTO(uint8_t *uuid), | ||
| 264 | |||
| 265 | TP_ARGS(uuid) | ||
| 266 | ); | ||
| 267 | |||
| 268 | #endif /* _TRACE_BCACHE_H */ | ||
| 269 | |||
| 270 | /* This part must be outside protection */ | ||
| 271 | #include <trace/define_trace.h> | ||
