#include "bcache.h"
#include "btree.h"
#include "debug.h"
#include "request.h"
#include "writeback.h"
#include <linux/module.h>
#include <linux/hash.h>
#include <linux/random.h>
#include <linux/backing-dev.h>
#include <trace/events/bcache.h>
#define CUTOFF_CACHE_ADD …
#define CUTOFF_CACHE_READA …
struct kmem_cache *bch_search_cache;
static CLOSURE_CALLBACK(bch_data_insert_start);
static unsigned int cache_mode(struct cached_dev *dc)
{ … }
static bool verify(struct cached_dev *dc)
{ … }
static void bio_csum(struct bio *bio, struct bkey *k)
{ … }
static CLOSURE_CALLBACK(bch_data_insert_keys)
{ … }
static int bch_keylist_realloc(struct keylist *l, unsigned int u64s,
struct cache_set *c)
{ … }
static void bch_data_invalidate(struct closure *cl)
{ … }
static CLOSURE_CALLBACK(bch_data_insert_error)
{ … }
static void bch_data_insert_endio(struct bio *bio)
{ … }
static CLOSURE_CALLBACK(bch_data_insert_start)
{ … }
CLOSURE_CALLBACK(bch_data_insert)
{ … }
unsigned int bch_get_congested(const struct cache_set *c)
{ … }
static void add_sequential(struct task_struct *t)
{ … }
static struct hlist_head *iohash(struct cached_dev *dc, uint64_t k)
{ … }
static bool check_should_bypass(struct cached_dev *dc, struct bio *bio)
{ … }
struct search { … };
static void bch_cache_read_endio(struct bio *bio)
{ … }
static int cache_lookup_fn(struct btree_op *op, struct btree *b, struct bkey *k)
{ … }
static CLOSURE_CALLBACK(cache_lookup)
{ … }
static void request_endio(struct bio *bio)
{ … }
static void backing_request_endio(struct bio *bio)
{ … }
static void bio_complete(struct search *s)
{ … }
static void do_bio_hook(struct search *s,
struct bio *orig_bio,
bio_end_io_t *end_io_fn)
{ … }
static CLOSURE_CALLBACK(search_free)
{ … }
static inline struct search *search_alloc(struct bio *bio,
struct bcache_device *d, struct block_device *orig_bdev,
unsigned long start_time)
{ … }
static CLOSURE_CALLBACK(cached_dev_bio_complete)
{ … }
static CLOSURE_CALLBACK(cached_dev_read_error_done)
{ … }
static CLOSURE_CALLBACK(cached_dev_read_error)
{ … }
static CLOSURE_CALLBACK(cached_dev_cache_miss_done)
{ … }
static CLOSURE_CALLBACK(cached_dev_read_done)
{ … }
static CLOSURE_CALLBACK(cached_dev_read_done_bh)
{ … }
static int cached_dev_cache_miss(struct btree *b, struct search *s,
struct bio *bio, unsigned int sectors)
{ … }
static void cached_dev_read(struct cached_dev *dc, struct search *s)
{ … }
static CLOSURE_CALLBACK(cached_dev_write_complete)
{ … }
static void cached_dev_write(struct cached_dev *dc, struct search *s)
{ … }
static CLOSURE_CALLBACK(cached_dev_nodata)
{ … }
struct detached_dev_io_private { … };
static void detached_dev_end_io(struct bio *bio)
{ … }
static void detached_dev_do_request(struct bcache_device *d, struct bio *bio,
struct block_device *orig_bdev, unsigned long start_time)
{ … }
static void quit_max_writeback_rate(struct cache_set *c,
struct cached_dev *this_dc)
{ … }
void cached_dev_submit_bio(struct bio *bio)
{ … }
static int cached_dev_ioctl(struct bcache_device *d, blk_mode_t mode,
unsigned int cmd, unsigned long arg)
{ … }
void bch_cached_dev_request_init(struct cached_dev *dc)
{ … }
static int flash_dev_cache_miss(struct btree *b, struct search *s,
struct bio *bio, unsigned int sectors)
{ … }
static CLOSURE_CALLBACK(flash_dev_nodata)
{ … }
void flash_dev_submit_bio(struct bio *bio)
{ … }
static int flash_dev_ioctl(struct bcache_device *d, blk_mode_t mode,
unsigned int cmd, unsigned long arg)
{ … }
void bch_flash_dev_request_init(struct bcache_device *d)
{ … }
void bch_request_exit(void)
{ … }
int __init bch_request_init(void)
{ … }