Merge remote-tracking branch 'spi/topic/dma' into spi-next
[linux-2.6-block.git] / drivers / md / bcache / request.h
CommitLineData
cafe5635
KO
1#ifndef _BCACHE_REQUEST_H_
2#define _BCACHE_REQUEST_H_
3
220bb38c 4struct data_insert_op {
cafe5635 5 struct closure cl;
c18536a7 6 struct cache_set *c;
220bb38c 7 struct bio *bio;
da415a09 8 struct workqueue_struct *wq;
cafe5635 9
c18536a7 10 unsigned inode;
2599b53b 11 uint16_t write_point;
220bb38c
KO
12 uint16_t write_prio;
13 short error;
c18536a7 14
a5ae4300
KO
15 union {
16 uint16_t flags;
c18536a7 17
a5ae4300
KO
18 struct {
19 unsigned bypass:1;
20 unsigned writeback:1;
21 unsigned flush_journal:1;
22 unsigned csum:1;
cafe5635 23
a5ae4300
KO
24 unsigned replace:1;
25 unsigned replace_collision:1;
26
27 unsigned insert_data_done:1;
28 };
29 };
0b93207a 30
0b93207a 31 struct keylist insert_keys;
1b207d80 32 BKEY_PADDED(replace_key);
cafe5635
KO
33};
34
c37511b8 35unsigned bch_get_congested(struct cache_set *);
a34a8bfd 36void bch_data_insert(struct closure *cl);
cafe5635 37
cafe5635
KO
38void bch_cached_dev_request_init(struct cached_dev *dc);
39void bch_flash_dev_request_init(struct bcache_device *d);
40
41extern struct kmem_cache *bch_search_cache, *bch_passthrough_cache;
42
cafe5635 43#endif /* _BCACHE_REQUEST_H_ */