Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Internal header file for device mapper
0003  *
0004  * Copyright (C) 2016 Red Hat, Inc. All rights reserved.
0005  *
0006  * This file is released under the LGPL.
0007  */
0008 
0009 #ifndef DM_RQ_INTERNAL_H
0010 #define DM_RQ_INTERNAL_H
0011 
0012 #include <linux/bio.h>
0013 #include <linux/kthread.h>
0014 
0015 #include "dm-stats.h"
0016 
0017 struct mapped_device;
0018 
0019 /*
0020  * For request-based dm - the bio clones we allocate are embedded in these
0021  * structs.
0022  *
0023  * We allocate these with bio_alloc_bioset, using the front_pad parameter when
0024  * the bioset is created - this means the bio has to come at the end of the
0025  * struct.
0026  */
0027 struct dm_rq_clone_bio_info {
0028     struct bio *orig;
0029     struct dm_rq_target_io *tio;
0030     struct bio clone;
0031 };
0032 
0033 int dm_mq_init_request_queue(struct mapped_device *md, struct dm_table *t);
0034 void dm_mq_cleanup_mapped_device(struct mapped_device *md);
0035 
0036 void dm_start_queue(struct request_queue *q);
0037 void dm_stop_queue(struct request_queue *q);
0038 
0039 void dm_mq_kick_requeue_list(struct mapped_device *md);
0040 
0041 unsigned dm_get_reserved_rq_based_ios(void);
0042 
0043 ssize_t dm_attr_rq_based_seq_io_merge_deadline_show(struct mapped_device *md, char *buf);
0044 ssize_t dm_attr_rq_based_seq_io_merge_deadline_store(struct mapped_device *md,
0045                              const char *buf, size_t count);
0046 
0047 #endif