dm-rq.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Internal header file for device mapper
  3. *
  4. * Copyright (C) 2016 Red Hat, Inc. All rights reserved.
  5. *
  6. * This file is released under the LGPL.
  7. */
  8. #ifndef DM_RQ_INTERNAL_H
  9. #define DM_RQ_INTERNAL_H
  10. #include <linux/bio.h>
  11. #include <linux/kthread.h>
  12. #include "dm-stats.h"
  13. struct mapped_device;
  14. /*
  15. * For request-based dm - the bio clones we allocate are embedded in these
  16. * structs.
  17. *
  18. * We allocate these with bio_alloc_bioset, using the front_pad parameter when
  19. * the bioset is created - this means the bio has to come at the end of the
  20. * struct.
  21. */
  22. struct dm_rq_clone_bio_info {
  23. struct bio *orig;
  24. struct dm_rq_target_io *tio;
  25. struct bio clone;
  26. };
  27. int dm_mq_init_request_queue(struct mapped_device *md, struct dm_table *t);
  28. void dm_mq_cleanup_mapped_device(struct mapped_device *md);
  29. void dm_start_queue(struct request_queue *q);
  30. void dm_stop_queue(struct request_queue *q);
  31. void dm_mq_kick_requeue_list(struct mapped_device *md);
  32. unsigned dm_get_reserved_rq_based_ios(void);
  33. ssize_t dm_attr_rq_based_seq_io_merge_deadline_show(struct mapped_device *md, char *buf);
  34. ssize_t dm_attr_rq_based_seq_io_merge_deadline_store(struct mapped_device *md,
  35. const char *buf, size_t count);
  36. #endif