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>
This commit is contained in:
@@ -173,6 +173,13 @@ struct target_type {
|
||||
#define dm_target_always_writeable(type) \
|
||||
((type)->features & DM_TARGET_ALWAYS_WRITEABLE)
|
||||
|
||||
/*
|
||||
* Any device that contains a table with an instance of this target may never
|
||||
* have tables containing any different target type.
|
||||
*/
|
||||
#define DM_TARGET_IMMUTABLE 0x00000004
|
||||
#define dm_target_is_immutable(type) ((type)->features & DM_TARGET_IMMUTABLE)
|
||||
|
||||
struct dm_target {
|
||||
struct dm_table *table;
|
||||
struct target_type *type;
|
||||
|
Reference in New Issue
Block a user