]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - drivers/md/bcache/request.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / drivers / md / bcache / request.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
cafe5635
KO
2#ifndef _BCACHE_REQUEST_H_
3#define _BCACHE_REQUEST_H_
4
220bb38c 5struct data_insert_op {
cafe5635 6 struct closure cl;
c18536a7 7 struct cache_set *c;
220bb38c 8 struct bio *bio;
da415a09 9 struct workqueue_struct *wq;
cafe5635 10
c18536a7 11 unsigned inode;
2599b53b 12 uint16_t write_point;
220bb38c 13 uint16_t write_prio;
4e4cbee9 14 blk_status_t status;
c18536a7 15
a5ae4300
KO
16 union {
17 uint16_t flags;
c18536a7 18
a5ae4300
KO
19 struct {
20 unsigned bypass:1;
21 unsigned writeback:1;
22 unsigned flush_journal:1;
23 unsigned csum:1;
cafe5635 24
a5ae4300
KO
25 unsigned replace:1;
26 unsigned replace_collision:1;
27
28 unsigned insert_data_done:1;
29 };
30 };
0b93207a 31
0b93207a 32 struct keylist insert_keys;
1b207d80 33 BKEY_PADDED(replace_key);
cafe5635
KO
34};
35
c37511b8 36unsigned bch_get_congested(struct cache_set *);
a34a8bfd 37void bch_data_insert(struct closure *cl);
cafe5635 38
cafe5635
KO
39void bch_cached_dev_request_init(struct cached_dev *dc);
40void bch_flash_dev_request_init(struct bcache_device *d);
41
42extern struct kmem_cache *bch_search_cache, *bch_passthrough_cache;
43
cafe5635 44#endif /* _BCACHE_REQUEST_H_ */