Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / md / dm-rq.h
blob1f73e194e792918d1263d4decd0c9f9b4a8062c1
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Internal header file for device mapper
5 * Copyright (C) 2016 Red Hat, Inc. All rights reserved.
7 * This file is released under the LGPL.
8 */
10 #ifndef DM_RQ_INTERNAL_H
11 #define DM_RQ_INTERNAL_H
13 #include <linux/bio.h>
14 #include <linux/kthread.h>
16 #include "dm-stats.h"
18 struct mapped_device;
21 * For request-based dm - the bio clones we allocate are embedded in these
22 * structs.
24 * We allocate these with bio_alloc_bioset, using the front_pad parameter when
25 * the bioset is created - this means the bio has to come at the end of the
26 * struct.
28 struct dm_rq_clone_bio_info {
29 struct bio *orig;
30 struct dm_rq_target_io *tio;
31 struct bio clone;
34 int dm_mq_init_request_queue(struct mapped_device *md, struct dm_table *t);
35 void dm_mq_cleanup_mapped_device(struct mapped_device *md);
37 void dm_start_queue(struct request_queue *q);
38 void dm_stop_queue(struct request_queue *q);
40 void dm_mq_kick_requeue_list(struct mapped_device *md);
42 unsigned int dm_get_reserved_rq_based_ios(void);
44 ssize_t dm_attr_rq_based_seq_io_merge_deadline_show(struct mapped_device *md, char *buf);
45 ssize_t dm_attr_rq_based_seq_io_merge_deadline_store(struct mapped_device *md,
46 const char *buf, size_t count);
48 #endif