request.h 914 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _BCACHE_REQUEST_H_
  3. #define _BCACHE_REQUEST_H_
  4. struct data_insert_op {
  5. struct closure cl;
  6. struct cache_set *c;
  7. struct bio *bio;
  8. struct workqueue_struct *wq;
  9. unsigned int inode;
  10. uint16_t write_point;
  11. uint16_t write_prio;
  12. blk_status_t status;
  13. union {
  14. uint16_t flags;
  15. struct {
  16. unsigned int bypass:1;
  17. unsigned int writeback:1;
  18. unsigned int flush_journal:1;
  19. unsigned int csum:1;
  20. unsigned int replace:1;
  21. unsigned int replace_collision:1;
  22. unsigned int insert_data_done:1;
  23. };
  24. };
  25. struct keylist insert_keys;
  26. BKEY_PADDED(replace_key);
  27. };
  28. unsigned int bch_get_congested(const struct cache_set *c);
  29. void bch_data_insert(struct closure *cl);
  30. void bch_cached_dev_request_init(struct cached_dev *dc);
  31. void bch_flash_dev_request_init(struct bcache_device *d);
  32. extern struct kmem_cache *bch_search_cache;
  33. #endif /* _BCACHE_REQUEST_H_ */