Merge tag 'gpio-v3.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[linux-2.6.git] / drivers / md / bcache / request.h
blob2cd65bf073c24689542d78f0ef316f81ed21ba1c
1 #ifndef _BCACHE_REQUEST_H_
2 #define _BCACHE_REQUEST_H_
4 #include <linux/cgroup.h>
6 struct data_insert_op {
7 struct closure cl;
8 struct cache_set *c;
9 struct bio *bio;
11 unsigned inode;
12 uint16_t write_point;
13 uint16_t write_prio;
14 short error;
16 unsigned bypass:1;
17 unsigned writeback:1;
18 unsigned flush_journal:1;
19 unsigned csum:1;
21 unsigned replace:1;
22 unsigned replace_collision:1;
24 unsigned insert_data_done:1;
26 /* Anything past this point won't get zeroed in search_alloc() */
27 struct keylist insert_keys;
28 BKEY_PADDED(replace_key);
31 unsigned bch_get_congested(struct cache_set *);
32 void bch_data_insert(struct closure *cl);
34 void bch_cached_dev_request_init(struct cached_dev *dc);
35 void bch_flash_dev_request_init(struct bcache_device *d);
37 extern struct kmem_cache *bch_search_cache, *bch_passthrough_cache;
39 struct bch_cgroup {
40 #ifdef CONFIG_CGROUP_BCACHE
41 struct cgroup_subsys_state css;
42 #endif
44 * We subtract one from the index into bch_cache_modes[], so that
45 * default == -1; this makes it so the rest match up with d->cache_mode,
46 * and we use d->cache_mode if cgrp->cache_mode < 0
48 short cache_mode;
49 bool verify;
50 struct cache_stat_collector stats;
53 struct bch_cgroup *bch_bio_to_cgroup(struct bio *bio);
55 #endif /* _BCACHE_REQUEST_H_ */