diff options
author | Alasdair Kergon <agk@redhat.com> | 2004-03-08 17:19:15 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2004-03-08 17:19:15 +0000 |
commit | cf6dd251261f9fb273c39a09fcb6863cdc13cd07 (patch) | |
tree | 8e5317e014b28c4d8adfd28487442ffd541f1ce1 /lib/metadata/merge.c | |
parent | 5071196631d9f96b977b492558c48f5b66020c8b (diff) | |
download | lvm2-cf6dd251261f9fb273c39a09fcb6863cdc13cd07.tar.gz lvm2-cf6dd251261f9fb273c39a09fcb6863cdc13cd07.tar.xz lvm2-cf6dd251261f9fb273c39a09fcb6863cdc13cd07.zip |
tagging
Diffstat (limited to 'lib/metadata/merge.c')
-rw-r--r-- | lib/metadata/merge.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/metadata/merge.c b/lib/metadata/merge.c index 286a92b8..ed628dca 100644 --- a/lib/metadata/merge.c +++ b/lib/metadata/merge.c @@ -8,6 +8,7 @@ #include "metadata.h" #include "toolcontext.h" #include "lv_alloc.h" +#include "str_list.h" /* * Test whether two segments could be merged by the current merging code @@ -40,6 +41,9 @@ static int _segments_compatible(struct lv_segment *first, return 0; } + if (!str_list_lists_equal(&first->tags, &second->tags)) + return 0; + return 1; } @@ -129,6 +133,11 @@ static int _lv_split_segment(struct logical_volume *lv, struct lv_segment *seg, len = sizeof(*seg) + (seg->area_count * sizeof(seg->area[0])); memcpy(split_seg, seg, len); + if (!str_list_dup(lv->vg->cmd->mem, &split_seg->tags, &seg->tags)) { + log_error("LV segment tags duplication failed"); + return 0; + } + /* In case of a striped segment, the offset has to be / stripes */ if (seg->type == SEG_STRIPED) offset /= seg->area_count; |