Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | #ifndef _BCACHE_REQUEST_H_ |
| 3 | #define _BCACHE_REQUEST_H_ |
| 4 | |
| 5 | struct data_insert_op { |
| 6 | struct closure cl; |
| 7 | struct cache_set *c; |
| 8 | struct bio *bio; |
| 9 | struct workqueue_struct *wq; |
| 10 | |
| 11 | unsigned int inode; |
| 12 | uint16_t write_point; |
| 13 | uint16_t write_prio; |
| 14 | blk_status_t status; |
| 15 | |
| 16 | union { |
| 17 | uint16_t flags; |
| 18 | |
| 19 | struct { |
| 20 | unsigned int bypass:1; |
| 21 | unsigned int writeback:1; |
| 22 | unsigned int flush_journal:1; |
| 23 | unsigned int csum:1; |
| 24 | |
| 25 | unsigned int replace:1; |
| 26 | unsigned int replace_collision:1; |
| 27 | |
| 28 | unsigned int insert_data_done:1; |
| 29 | }; |
| 30 | }; |
| 31 | |
| 32 | struct keylist insert_keys; |
| 33 | BKEY_PADDED(replace_key); |
| 34 | }; |
| 35 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 36 | unsigned int bch_get_congested(const struct cache_set *c); |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 37 | void bch_data_insert(struct closure *cl); |
| 38 | |
| 39 | void bch_cached_dev_request_init(struct cached_dev *dc); |
| 40 | void bch_flash_dev_request_init(struct bcache_device *d); |
| 41 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 42 | extern struct kmem_cache *bch_search_cache; |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 43 | |
| 44 | #endif /* _BCACHE_REQUEST_H_ */ |