1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2cafe5635SKent Overstreet #ifndef _BCACHE_REQUEST_H_ 3cafe5635SKent Overstreet #define _BCACHE_REQUEST_H_ 4cafe5635SKent Overstreet 5220bb38cSKent Overstreet struct data_insert_op { 6cafe5635SKent Overstreet struct closure cl; 7c18536a7SKent Overstreet struct cache_set *c; 8220bb38cSKent Overstreet struct bio *bio; 9da415a09SNicholas Swenson struct workqueue_struct *wq; 10cafe5635SKent Overstreet 11*6f10f7d1SColy Li unsigned int inode; 122599b53bSKent Overstreet uint16_t write_point; 13220bb38cSKent Overstreet uint16_t write_prio; 144e4cbee9SChristoph Hellwig blk_status_t status; 15c18536a7SKent Overstreet 16a5ae4300SKent Overstreet union { 17a5ae4300SKent Overstreet uint16_t flags; 18a5ae4300SKent Overstreet 19a5ae4300SKent Overstreet struct { 20*6f10f7d1SColy Li unsigned int bypass:1; 21*6f10f7d1SColy Li unsigned int writeback:1; 22*6f10f7d1SColy Li unsigned int flush_journal:1; 23*6f10f7d1SColy Li unsigned int csum:1; 24220bb38cSKent Overstreet 25*6f10f7d1SColy Li unsigned int replace:1; 26*6f10f7d1SColy Li unsigned int replace_collision:1; 27c18536a7SKent Overstreet 28*6f10f7d1SColy Li unsigned int insert_data_done:1; 29a5ae4300SKent Overstreet }; 30a5ae4300SKent Overstreet }; 310b93207aSKent Overstreet 320b93207aSKent Overstreet struct keylist insert_keys; 331b207d80SKent Overstreet BKEY_PADDED(replace_key); 34cafe5635SKent Overstreet }; 35cafe5635SKent Overstreet 36*6f10f7d1SColy Li unsigned int bch_get_congested(struct cache_set *); 37a34a8bfdSKent Overstreet void bch_data_insert(struct closure *cl); 38cafe5635SKent Overstreet 39cafe5635SKent Overstreet void bch_cached_dev_request_init(struct cached_dev *dc); 40cafe5635SKent Overstreet void bch_flash_dev_request_init(struct bcache_device *d); 41cafe5635SKent Overstreet 42cafe5635SKent Overstreet extern struct kmem_cache *bch_search_cache, *bch_passthrough_cache; 43cafe5635SKent Overstreet 44cafe5635SKent Overstreet #endif /* _BCACHE_REQUEST_H_ */ 45