dm-rq.h 1.2 KB

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