aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/movinggc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/bcache/movinggc.c')
-rw-r--r--drivers/md/bcache/movinggc.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/md/bcache/movinggc.c b/drivers/md/bcache/movinggc.c
index 8589512c972e..04f6b97ffda6 100644
--- a/drivers/md/bcache/movinggc.c
+++ b/drivers/md/bcache/movinggc.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
12struct moving_io { 14struct moving_io {
13 struct keybuf_key *w; 15 struct keybuf_key *w;
14 struct search s; 16 struct search s;
@@ -49,9 +51,8 @@ static void write_moving_finish(struct closure *cl)
49 while (bv-- != bio->bi_io_vec) 51 while (bv-- != bio->bi_io_vec)
50 __free_page(bv->bv_page); 52 __free_page(bv->bv_page);
51 53
52 pr_debug("%s %s", io->s.op.insert_collision 54 if (io->s.op.insert_collision)
53 ? "collision moving" : "moved", 55 trace_bcache_gc_copy_collision(&io->w->key);
54 pkey(&io->w->key));
55 56
56 bch_keybuf_del(&io->s.op.c->moving_gc_keys, io->w); 57 bch_keybuf_del(&io->s.op.c->moving_gc_keys, io->w);
57 58
@@ -94,8 +95,6 @@ static void write_moving(struct closure *cl)
94 struct moving_io *io = container_of(s, struct moving_io, s); 95 struct moving_io *io = container_of(s, struct moving_io, s);
95 96
96 if (!s->error) { 97 if (!s->error) {
97 trace_bcache_write_moving(&io->bio.bio);
98
99 moving_init(io); 98 moving_init(io);
100 99
101 io->bio.bio.bi_sector = KEY_START(&io->w->key); 100 io->bio.bio.bi_sector = KEY_START(&io->w->key);
@@ -122,7 +121,6 @@ static void read_moving_submit(struct closure *cl)
122 struct moving_io *io = container_of(s, struct moving_io, s); 121 struct moving_io *io = container_of(s, struct moving_io, s);
123 struct bio *bio = &io->bio.bio; 122 struct bio *bio = &io->bio.bio;
124 123
125 trace_bcache_read_moving(bio);
126 bch_submit_bbio(bio, s->op.c, &io->w->key, 0); 124 bch_submit_bbio(bio, s->op.c, &io->w->key, 0);
127 125
128 continue_at(cl, write_moving, bch_gc_wq); 126 continue_at(cl, write_moving, bch_gc_wq);
@@ -162,7 +160,7 @@ static void read_moving(struct closure *cl)
162 if (bch_bio_alloc_pages(bio, GFP_KERNEL)) 160 if (bch_bio_alloc_pages(bio, GFP_KERNEL))
163 goto err; 161 goto err;
164 162
165 pr_debug("%s", pkey(&w->key)); 163 trace_bcache_gc_copy(&w->key);
166 164
167 closure_call(&io->s.cl, read_moving_submit, NULL, &c->gc.cl); 165 closure_call(&io->s.cl, read_moving_submit, NULL, &c->gc.cl);
168 166