summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBart Van Assche2017-04-27 19:11:23 +0200
committerMike Snitzer2017-04-27 23:08:44 +0200
commit7e0d574f2683a2346c978613a72ff07afc89b17a (patch)
treef1b83fd5151b6f364b01b25950b174914205acc4 /include/linux
parentdm mpath: verify __pg_init_all_paths locking assumptions at runtime (diff)
downloadkernel-qcow2-linux-7e0d574f2683a2346c978613a72ff07afc89b17a.tar.gz
kernel-qcow2-linux-7e0d574f2683a2346c978613a72ff07afc89b17a.tar.xz
kernel-qcow2-linux-7e0d574f2683a2346c978613a72ff07afc89b17a.zip
dm: introduce enum dm_queue_mode to cleanup related code
Introduce an enumeration type for the queue mode. This patch does not change any functionality but makes the DM code easier to read. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/device-mapper.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 98f981026e4e..1ce4036224eb 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -22,11 +22,13 @@ struct bio_vec;
/*
* Type of table, mapped_device's mempool and request_queue
*/
-#define DM_TYPE_NONE 0
-#define DM_TYPE_BIO_BASED 1
-#define DM_TYPE_REQUEST_BASED 2
-#define DM_TYPE_MQ_REQUEST_BASED 3
-#define DM_TYPE_DAX_BIO_BASED 4
+enum dm_queue_mode {
+ DM_TYPE_NONE = 0,
+ DM_TYPE_BIO_BASED = 1,
+ DM_TYPE_REQUEST_BASED = 2,
+ DM_TYPE_MQ_REQUEST_BASED = 3,
+ DM_TYPE_DAX_BIO_BASED = 4,
+};
typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t;
@@ -476,7 +478,7 @@ void dm_table_add_target_callbacks(struct dm_table *t, struct dm_target_callback
* Useful for "hybrid" target (supports both bio-based
* and request-based).
*/
-void dm_table_set_type(struct dm_table *t, unsigned type);
+void dm_table_set_type(struct dm_table *t, enum dm_queue_mode type);
/*
* Finally call this to make the table ready for use.