request.h 849 B

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