aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/request.h
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-09-10 19:02:45 -0700
committerKent Overstreet <kmo@daterainc.com>2013-11-10 21:56:32 -0800
commit220bb38c21b83e2f7b842f33220bf727093eca89 (patch)
tree7388a855ca920ca88c0b9a4d66839946ba4cd848 /drivers/md/bcache/request.h
parentbcache: Convert bch_btree_insert() to bch_btree_map_leaf_nodes() (diff)
downloadlinux-dev-220bb38c21b83e2f7b842f33220bf727093eca89.tar.xz
linux-dev-220bb38c21b83e2f7b842f33220bf727093eca89.zip
bcache: Break up struct search
With all the recent refactoring around struct btree op struct search has gotten rather large. But we can now easily break it up in a different way - we break out struct btree_insert_op which is for inserting data into the cache, and that's now what the copying gc code uses - struct search is now specific to request.c Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/request.h')
-rw-r--r--drivers/md/bcache/request.h37
1 files changed, 8 insertions, 29 deletions
diff --git a/drivers/md/bcache/request.h b/drivers/md/bcache/request.h
index f0e930b4ca89..54d7de27356f 100644
--- a/drivers/md/bcache/request.h
+++ b/drivers/md/bcache/request.h
@@ -3,46 +3,25 @@
#include <linux/cgroup.h>
-struct search {
- /* Stack frame for bio_complete */
+struct data_insert_op {
struct closure cl;
- struct closure btree;
-
- struct bcache_device *d;
struct cache_set *c;
struct task_struct *task;
-
- struct bbio bio;
- struct bio *orig_bio;
- struct bio *cache_miss;
-
- /* Bio to be inserted into the cache */
- struct bio *cache_bio;
- unsigned cache_bio_sectors;
+ struct bio *bio;
unsigned inode;
+ uint16_t write_prio;
+ short error;
- unsigned recoverable:1;
- unsigned unaligned_bvec:1;
-
- unsigned write:1;
- unsigned writeback:1;
-
- unsigned csum:1;
unsigned bypass:1;
+ unsigned writeback:1;
unsigned flush_journal:1;
+ unsigned csum:1;
- unsigned insert_data_done:1;
unsigned replace:1;
- unsigned insert_collision:1;
-
- uint16_t write_prio;
-
- /* IO error returned to s->bio */
- short error;
- unsigned long start_time;
+ unsigned replace_collision:1;
- struct btree_op op;
+ unsigned insert_data_done:1;
/* Anything past this point won't get zeroed in search_alloc() */
struct keylist insert_keys;