summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-03-18 13:57:01 -0600
committerJens Axboe <axboe@fb.com>2014-03-18 13:57:01 -0600
commite84987a1f941b8e2e3173bb38510ddf25cc8c7f0 (patch)
treea2f3693fc53ae68e57ffdd36808badd6b73a7b83 /include
parent5eb9291c36c7d71d7c6c832d5a4f551eb8ac015d (diff)
parentcb85114956dc88b287afca2872658f562acbc302 (diff)
downloadlinux-e84987a1f941b8e2e3173bb38510ddf25cc8c7f0.tar.bz2
Merge branch 'bcache-for-3.15' of git://evilpiepirate.org/~kent/linux-bcache into for-3.15/drivers
Kent writes: Jens, here's the bcache changes for 3.15. Lots of bugfixes, and some refactoring and cleanups.
Diffstat (limited to 'include')
-rw-r--r--include/trace/events/bcache.h52
1 files changed, 35 insertions, 17 deletions
diff --git a/include/trace/events/bcache.h b/include/trace/events/bcache.h
index 7110897c3dfa..c9c3c044b32f 100644
--- a/include/trace/events/bcache.h
+++ b/include/trace/events/bcache.h
@@ -399,26 +399,43 @@ TRACE_EVENT(bcache_keyscan,
/* Allocator */
-TRACE_EVENT(bcache_alloc_invalidate,
- TP_PROTO(struct cache *ca),
- TP_ARGS(ca),
+TRACE_EVENT(bcache_invalidate,
+ TP_PROTO(struct cache *ca, size_t bucket),
+ TP_ARGS(ca, bucket),
TP_STRUCT__entry(
- __field(unsigned, free )
- __field(unsigned, free_inc )
- __field(unsigned, free_inc_size )
- __field(unsigned, unused )
+ __field(unsigned, sectors )
+ __field(dev_t, dev )
+ __field(__u64, offset )
),
TP_fast_assign(
- __entry->free = fifo_used(&ca->free[RESERVE_NONE]);
- __entry->free_inc = fifo_used(&ca->free_inc);
- __entry->free_inc_size = ca->free_inc.size;
- __entry->unused = fifo_used(&ca->unused);
+ __entry->dev = ca->bdev->bd_dev;
+ __entry->offset = bucket << ca->set->bucket_bits;
+ __entry->sectors = GC_SECTORS_USED(&ca->buckets[bucket]);
),
- TP_printk("free %u free_inc %u/%u unused %u", __entry->free,
- __entry->free_inc, __entry->free_inc_size, __entry->unused)
+ TP_printk("invalidated %u sectors at %d,%d sector=%llu",
+ __entry->sectors, MAJOR(__entry->dev),
+ MINOR(__entry->dev), __entry->offset)
+);
+
+TRACE_EVENT(bcache_alloc,
+ TP_PROTO(struct cache *ca, size_t bucket),
+ TP_ARGS(ca, bucket),
+
+ TP_STRUCT__entry(
+ __field(dev_t, dev )
+ __field(__u64, offset )
+ ),
+
+ TP_fast_assign(
+ __entry->dev = ca->bdev->bd_dev;
+ __entry->offset = bucket << ca->set->bucket_bits;
+ ),
+
+ TP_printk("allocated %d,%d sector=%llu", MAJOR(__entry->dev),
+ MINOR(__entry->dev), __entry->offset)
);
TRACE_EVENT(bcache_alloc_fail,
@@ -426,21 +443,22 @@ TRACE_EVENT(bcache_alloc_fail,
TP_ARGS(ca, reserve),
TP_STRUCT__entry(
+ __field(dev_t, dev )
__field(unsigned, free )
__field(unsigned, free_inc )
- __field(unsigned, unused )
__field(unsigned, blocked )
),
TP_fast_assign(
+ __entry->dev = ca->bdev->bd_dev;
__entry->free = fifo_used(&ca->free[reserve]);
__entry->free_inc = fifo_used(&ca->free_inc);
- __entry->unused = fifo_used(&ca->unused);
__entry->blocked = atomic_read(&ca->set->prio_blocked);
),
- TP_printk("free %u free_inc %u unused %u blocked %u", __entry->free,
- __entry->free_inc, __entry->unused, __entry->blocked)
+ TP_printk("alloc fail %d,%d free %u free_inc %u blocked %u",
+ MAJOR(__entry->dev), MINOR(__entry->dev), __entry->free,
+ __entry->free_inc, __entry->blocked)
);
/* Background writeback */