diff options
author | Alasdair G Kergon <agk@redhat.com> | 2011-10-31 16:19:04 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2011-10-31 16:19:04 -0400 |
commit | 36a0456fbf2d9680bf9af81b39daf4a8e22cb1b8 (patch) | |
tree | a19af18640d538e8357c195e6b4c77d0f6c92391 /drivers/md/dm.h | |
parent | cc6cbe141a20f6d876b161b60af38d93935bfa85 (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 'drivers/md/dm.h')
-rw-r--r-- | drivers/md/dm.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/dm.h b/drivers/md/dm.h index 6745dbd278a4..b7dacd59d8d7 100644 --- a/drivers/md/dm.h +++ b/drivers/md/dm.h | |||
@@ -60,6 +60,7 @@ int dm_table_resume_targets(struct dm_table *t); | |||
60 | int dm_table_any_congested(struct dm_table *t, int bdi_bits); | 60 | int dm_table_any_congested(struct dm_table *t, int bdi_bits); |
61 | int dm_table_any_busy_target(struct dm_table *t); | 61 | int dm_table_any_busy_target(struct dm_table *t); |
62 | unsigned dm_table_get_type(struct dm_table *t); | 62 | unsigned dm_table_get_type(struct dm_table *t); |
63 | struct target_type *dm_table_get_immutable_target_type(struct dm_table *t); | ||
63 | bool dm_table_request_based(struct dm_table *t); | 64 | bool dm_table_request_based(struct dm_table *t); |
64 | bool dm_table_supports_discards(struct dm_table *t); | 65 | bool dm_table_supports_discards(struct dm_table *t); |
65 | int dm_table_alloc_md_mempools(struct dm_table *t); | 66 | int dm_table_alloc_md_mempools(struct dm_table *t); |
@@ -72,6 +73,7 @@ void dm_lock_md_type(struct mapped_device *md); | |||
72 | void dm_unlock_md_type(struct mapped_device *md); | 73 | void dm_unlock_md_type(struct mapped_device *md); |
73 | void dm_set_md_type(struct mapped_device *md, unsigned type); | 74 | void dm_set_md_type(struct mapped_device *md, unsigned type); |
74 | unsigned dm_get_md_type(struct mapped_device *md); | 75 | unsigned dm_get_md_type(struct mapped_device *md); |
76 | struct target_type *dm_get_immutable_target_type(struct mapped_device *md); | ||
75 | 77 | ||
76 | int dm_setup_md_queue(struct mapped_device *md); | 78 | int dm_setup_md_queue(struct mapped_device *md); |
77 | 79 | ||