aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/request.c
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-07-24 20:37:59 -0400
committerKent Overstreet <kmo@daterainc.com>2013-11-11 00:56:07 -0500
commitdf8e89701fb02cba6e09c5f46f002778b5b52dd2 (patch)
tree65092f8d1686620ba8cbf031e95bb575b585730b /drivers/md/bcache/request.c
parent48dad8baf92fe8967d9e1358af1cfdda1d2d3298 (diff)
bcache: Move some stuff to btree.c
With the new btree_map() functions, we don't need to export the stuff needed for traversing the btree anymore. Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/request.c')
-rw-r--r--drivers/md/bcache/request.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c
index f779eb420d69..a16872541038 100644
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@ -754,18 +754,6 @@ static struct search *search_alloc(struct bio *bio, struct bcache_device *d)
754 return s; 754 return s;
755} 755}
756 756
757static void btree_read_async(struct closure *cl)
758{
759 struct btree_op *op = container_of(cl, struct btree_op, cl);
760
761 int ret = btree_root(search_recurse, op->c, op);
762
763 if (ret == -EAGAIN)
764 continue_at(cl, btree_read_async, bcache_wq);
765
766 closure_return(cl);
767}
768
769/* Cached devices */ 757/* Cached devices */
770 758
771static void cached_dev_bio_complete(struct closure *cl) 759static void cached_dev_bio_complete(struct closure *cl)
@@ -1087,7 +1075,7 @@ static void cached_dev_read(struct cached_dev *dc, struct search *s)
1087{ 1075{
1088 struct closure *cl = &s->cl; 1076 struct closure *cl = &s->cl;
1089 1077
1090 closure_call(&s->op.cl, btree_read_async, NULL, cl); 1078 closure_call(&s->op.cl, bch_btree_search_async, NULL, cl);
1091 continue_at(cl, cached_dev_read_done_bh, NULL); 1079 continue_at(cl, cached_dev_read_done_bh, NULL);
1092} 1080}
1093 1081
@@ -1351,7 +1339,7 @@ static void flash_dev_make_request(struct request_queue *q, struct bio *bio)
1351 1339
1352 closure_call(&s->op.cl, bch_data_insert, NULL, cl); 1340 closure_call(&s->op.cl, bch_data_insert, NULL, cl);
1353 } else { 1341 } else {
1354 closure_call(&s->op.cl, btree_read_async, NULL, cl); 1342 closure_call(&s->op.cl, bch_btree_search_async, NULL, cl);
1355 } 1343 }
1356 1344
1357 continue_at(cl, search_free, NULL); 1345 continue_at(cl, search_free, NULL);