LVM2/lib/metadata metadata.h thin_manip.c
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2012-01-25 08:55:20
Modified files:
lib/metadata : metadata.h thin_manip.c
Log message:
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.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.h.diff?cvsroot=lvm2&r1=1.264&r2=1.265
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/thin_manip.c.diff?cvsroot=lvm2&r1=1.29&r2=1.30
lib/metadata/metadata.h +6 -4
@@ -452,16 +452,18 @@/* * 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);
lib/metadata/thin_manip.c +65 -38
167 lines not on this page · raw message