diff options
Diffstat (limited to 'drivers/md/bcache/journal.c')
-rw-r--r-- | drivers/md/bcache/journal.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c index 970d819d4350..5ca22149b749 100644 --- a/drivers/md/bcache/journal.c +++ b/drivers/md/bcache/journal.c | |||
@@ -9,6 +9,8 @@ | |||
9 | #include "debug.h" | 9 | #include "debug.h" |
10 | #include "request.h" | 10 | #include "request.h" |
11 | 11 | ||
12 | #include <trace/events/bcache.h> | ||
13 | |||
12 | /* | 14 | /* |
13 | * Journal replay/recovery: | 15 | * Journal replay/recovery: |
14 | * | 16 | * |
@@ -300,7 +302,8 @@ int bch_journal_replay(struct cache_set *s, struct list_head *list, | |||
300 | for (k = i->j.start; | 302 | for (k = i->j.start; |
301 | k < end(&i->j); | 303 | k < end(&i->j); |
302 | k = bkey_next(k)) { | 304 | k = bkey_next(k)) { |
303 | pr_debug("%s", pkey(k)); | 305 | trace_bcache_journal_replay_key(k); |
306 | |||
304 | bkey_copy(op->keys.top, k); | 307 | bkey_copy(op->keys.top, k); |
305 | bch_keylist_push(&op->keys); | 308 | bch_keylist_push(&op->keys); |
306 | 309 | ||
@@ -712,7 +715,8 @@ void bch_journal(struct closure *cl) | |||
712 | spin_lock(&c->journal.lock); | 715 | spin_lock(&c->journal.lock); |
713 | 716 | ||
714 | if (journal_full(&c->journal)) { | 717 | if (journal_full(&c->journal)) { |
715 | /* XXX: tracepoint */ | 718 | trace_bcache_journal_full(c); |
719 | |||
716 | closure_wait(&c->journal.wait, cl); | 720 | closure_wait(&c->journal.wait, cl); |
717 | 721 | ||
718 | journal_reclaim(c); | 722 | journal_reclaim(c); |
@@ -728,13 +732,15 @@ void bch_journal(struct closure *cl) | |||
728 | 732 | ||
729 | if (b * c->sb.block_size > PAGE_SECTORS << JSET_BITS || | 733 | if (b * c->sb.block_size > PAGE_SECTORS << JSET_BITS || |
730 | b > c->journal.blocks_free) { | 734 | b > c->journal.blocks_free) { |
731 | /* XXX: If we were inserting so many keys that they won't fit in | 735 | trace_bcache_journal_entry_full(c); |
736 | |||
737 | /* | ||
738 | * XXX: If we were inserting so many keys that they won't fit in | ||
732 | * an _empty_ journal write, we'll deadlock. For now, handle | 739 | * an _empty_ journal write, we'll deadlock. For now, handle |
733 | * this in bch_keylist_realloc() - but something to think about. | 740 | * this in bch_keylist_realloc() - but something to think about. |
734 | */ | 741 | */ |
735 | BUG_ON(!w->data->keys); | 742 | BUG_ON(!w->data->keys); |
736 | 743 | ||
737 | /* XXX: tracepoint */ | ||
738 | BUG_ON(!closure_wait(&w->wait, cl)); | 744 | BUG_ON(!closure_wait(&w->wait, cl)); |
739 | 745 | ||
740 | closure_flush(&c->journal.io); | 746 | closure_flush(&c->journal.io); |