summaryrefslogtreecommitdiffstats
path: root/lib/metadata/metadata.h
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2012-01-25 08:55:19 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2012-01-25 08:55:19 +0000
commitd55aa53816162801da9689b629042d0177cf0d1c (patch)
tree117a2a37c764faf70c612e574e15ece677ff8969 /lib/metadata/metadata.h
parent5c8b1486051d2acf564128553fceefb984dddbb3 (diff)
downloadlvm2-d55aa53816162801da9689b629042d0177cf0d1c.tar.gz
lvm2-d55aa53816162801da9689b629042d0177cf0d1c.tar.xz
lvm2-d55aa53816162801da9689b629042d0177cf0d1c.zip
Thin fix transaction_id incrementation and code refactoring
Add pool_has_message and use it in attach_pool_message. Also update header to make more obvious which segment type is expected as parameter. Rename 'read_only' to 'no_update' (no auto update transaction_id) to better fit how it's used. Fix problem when there was only one stacked message replaced with delete message that caused unwanted transaction_id increase.
Diffstat (limited to 'lib/metadata/metadata.h')
-rw-r--r--lib/metadata/metadata.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/metadata/metadata.h b/lib/metadata/metadata.h
index a8d28e98..bdac6830 100644
--- a/lib/metadata/metadata.h
+++ b/lib/metadata/metadata.h
@@ -452,16 +452,18 @@ int fixup_imported_mirrors(struct volume_group *vg);
/*
* From thin_manip.c
*/
-int attach_pool_metadata_lv(struct lv_segment *seg,
+int attach_pool_metadata_lv(struct lv_segment *pool_seg,
struct logical_volume *pool_metadata_lv);
-int attach_pool_data_lv(struct lv_segment *seg,
+int attach_pool_data_lv(struct lv_segment *pool_seg,
struct logical_volume *pool_data_lv);
int attach_pool_lv(struct lv_segment *seg, struct logical_volume *pool_lv,
struct logical_volume *origin_lv);
int detach_pool_lv(struct lv_segment *seg);
-int attach_pool_message(struct lv_segment *seg, dm_thin_message_t type,
+int attach_pool_message(struct lv_segment *pool_seg, dm_thin_message_t type,
struct logical_volume *lv, uint32_t delete_id,
- int read_only);
+ int auto_increment);
+int pool_has_message(const struct lv_segment *seg,
+ const struct logical_volume *lv, uint32_t device_id);
int extend_pool(struct logical_volume *lv, const struct segment_type *segtype,
struct alloc_handle *ah, uint32_t stripes, uint32_t stripe_size);