Files

44 lines
908 B
C
Raw Permalink Normal View History

/* SPDX-License-Identifier: GPL-2.0 */
2013-03-23 16:11:31 -07:00
#ifndef _BCACHE_REQUEST_H_
#define _BCACHE_REQUEST_H_
2013-09-10 19:02:45 -07:00
struct data_insert_op {
2013-03-23 16:11:31 -07:00
struct closure cl;
2013-07-24 17:44:17 -07:00
struct cache_set *c;
2013-09-10 19:02:45 -07:00
struct bio *bio;
struct workqueue_struct *wq;
2013-03-23 16:11:31 -07:00
unsigned int inode;
2013-07-24 18:11:11 -07:00
uint16_t write_point;
2013-09-10 19:02:45 -07:00
uint16_t write_prio;
2017-06-03 09:38:06 +02:00
blk_status_t status;
2013-07-24 17:44:17 -07:00
2013-09-10 19:16:31 -07:00
union {
uint16_t flags;
2013-09-10 19:02:45 -07:00
2013-09-10 19:16:31 -07:00
struct {
unsigned int bypass:1;
unsigned int writeback:1;
unsigned int flush_journal:1;
unsigned int csum:1;
2013-07-24 17:44:17 -07:00
unsigned int replace:1;
unsigned int replace_collision:1;
2013-09-10 19:16:31 -07:00
unsigned int insert_data_done:1;
2013-09-10 19:16:31 -07:00
};
};
2013-07-24 17:26:51 -07:00
struct keylist insert_keys;
2013-09-10 18:52:54 -07:00
BKEY_PADDED(replace_key);
2013-03-23 16:11:31 -07:00
};
unsigned int bch_get_congested(struct cache_set *c);
2013-10-24 17:07:04 -07:00
void bch_data_insert(struct closure *cl);
2013-03-23 16:11:31 -07:00
void bch_cached_dev_request_init(struct cached_dev *dc);
void bch_flash_dev_request_init(struct bcache_device *d);
2018-10-08 20:41:16 +08:00
extern struct kmem_cache *bch_search_cache;
2013-03-23 16:11:31 -07:00
#endif /* _BCACHE_REQUEST_H_ */