PM / sleep: Asynchronous threads for suspend_noirq
[linux/fpc-iii.git] / drivers / md / bcache / request.h
blob39f21dbedc38b43ec7bf4818cfca319d27d27433
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 union {
17 uint16_t flags;
19 struct {
20 unsigned bypass:1;
21 unsigned writeback:1;
22 unsigned flush_journal:1;
23 unsigned csum:1;
25 unsigned replace:1;
26 unsigned replace_collision:1;
28 unsigned insert_data_done:1;
32 struct keylist insert_keys;
33 BKEY_PADDED(replace_key);
36 unsigned bch_get_congested(struct cache_set *);
37 void bch_data_insert(struct closure *cl);
39 void bch_cached_dev_request_init(struct cached_dev *dc);
40 void bch_flash_dev_request_init(struct bcache_device *d);
42 extern struct kmem_cache *bch_search_cache, *bch_passthrough_cache;
44 struct bch_cgroup {
45 #ifdef CONFIG_CGROUP_BCACHE
46 struct cgroup_subsys_state css;
47 #endif
49 * We subtract one from the index into bch_cache_modes[], so that
50 * default == -1; this makes it so the rest match up with d->cache_mode,
51 * and we use d->cache_mode if cgrp->cache_mode < 0
53 short cache_mode;
54 bool verify;
55 struct cache_stat_collector stats;
58 struct bch_cgroup *bch_bio_to_cgroup(struct bio *bio);
60 #endif /* _BCACHE_REQUEST_H_ */