aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device-mapper.h
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2011-10-31 16:19:04 -0400
committerAlasdair G Kergon <agk@redhat.com>2011-10-31 16:19:04 -0400
commit36a0456fbf2d9680bf9af81b39daf4a8e22cb1b8 (patch)
treea19af18640d538e8357c195e6b4c77d0f6c92391 /include/linux/device-mapper.h
parentcc6cbe141a20f6d876b161b60af38d93935bfa85 (diff)
dm table: add immutable feature
Introduce DM_TARGET_IMMUTABLE to indicate that the target type cannot be mixed with any other target type, and once loaded into a device, it cannot be replaced with a table containing a different type. The thin provisioning pool device will use this. Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'include/linux/device-mapper.h')
-rw-r--r--include/linux/device-mapper.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index cc58e2d7c032..98f34b886f95 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -173,6 +173,13 @@ struct target_type {
173#define dm_target_always_writeable(type) \ 173#define dm_target_always_writeable(type) \
174 ((type)->features & DM_TARGET_ALWAYS_WRITEABLE) 174 ((type)->features & DM_TARGET_ALWAYS_WRITEABLE)
175 175
176/*
177 * Any device that contains a table with an instance of this target may never
178 * have tables containing any different target type.
179 */
180#define DM_TARGET_IMMUTABLE 0x00000004
181#define dm_target_is_immutable(type) ((type)->features & DM_TARGET_IMMUTABLE)
182
176struct dm_target { 183struct dm_target {
177 struct dm_table *table; 184 struct dm_table *table;
178 struct target_type *type; 185 struct target_type *type;