aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/request.h
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-09-10 22:02:45 -0400
committerKent Overstreet <kmo@daterainc.com>2013-11-11 00:56:32 -0500
commit220bb38c21b83e2f7b842f33220bf727093eca89 (patch)
tree7388a855ca920ca88c0b9a4d66839946ba4cd848 /drivers/md/bcache/request.h
parentcc7b8819212f437fc82f0f9cdc24deb0fb5d775f (diff)
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 @@
3 3
4#include <linux/cgroup.h> 4#include <linux/cgroup.h>
5 5
6struct search { 6struct data_insert_op {
7 /* Stack frame for bio_complete */
8 struct closure cl; 7 struct closure cl;
9 struct closure btree;
10
11 struct bcache_device *d;
12 struct cache_set *c; 8 struct cache_set *c;
13 struct task_struct *task; 9 struct task_struct *task;
14 10 struct bio *bio;
15 struct bbio bio;
16 struct bio *orig_bio;
17 struct bio *cache_miss;
18
19 /* Bio to be inserted into the cache */
20 struct bio *cache_bio;
21 unsigned cache_bio_sectors;
22 11
23 unsigned inode; 12 unsigned inode;
13 uint16_t write_prio;
14 short error;
24 15
25 unsigned recoverable:1;
26 unsigned unaligned_bvec:1;
27
28 unsigned write:1;
29 unsigned writeback:1;
30
31 unsigned csum:1;
32 unsigned bypass:1; 16 unsigned bypass:1;
17 unsigned writeback:1;
33 unsigned flush_journal:1; 18 unsigned flush_journal:1;
19 unsigned csum:1;
34 20
35 unsigned insert_data_done:1;
36 unsigned replace:1; 21 unsigned replace:1;
37 unsigned insert_collision:1; 22 unsigned replace_collision:1;
38
39 uint16_t write_prio;
40
41 /* IO error returned to s->bio */
42 short error;
43 unsigned long start_time;
44 23
45 struct btree_op op; 24 unsigned insert_data_done:1;
46 25
47 /* Anything past this point won't get zeroed in search_alloc() */ 26 /* Anything past this point won't get zeroed in search_alloc() */
48 struct keylist insert_keys; 27 struct keylist insert_keys;