mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
metadata: Tidy merge.c
This commit is contained in:
parent
498da2414b
commit
8c872852cd
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
|
||||
* Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
|
||||
* Copyright (C) 2004-2016 Red Hat, Inc. All rights reserved.
|
||||
*
|
||||
* This file is part of LVM2.
|
||||
*
|
||||
@ -455,13 +455,14 @@ int check_lv_segments(struct logical_volume *lv, int complete_vg)
|
||||
seg_found++;
|
||||
}
|
||||
if (seg_is_replicator(seg) && lv == seg->rlog_lv)
|
||||
seg_found++;
|
||||
seg_found++;
|
||||
if (seg->log_lv == lv)
|
||||
seg_found++;
|
||||
if (seg->metadata_lv == lv || seg->pool_lv == lv)
|
||||
seg_found++;
|
||||
if (seg_is_thin_volume(seg) && (seg->origin == lv || seg->external_lv == lv))
|
||||
seg_found++;
|
||||
|
||||
if (!seg_found) {
|
||||
log_error("LV %s is used by LV %s:%" PRIu32 "-%" PRIu32
|
||||
", but missing ptr from %s to %s",
|
||||
@ -480,10 +481,11 @@ int check_lv_segments(struct logical_volume *lv, int complete_vg)
|
||||
|
||||
seg_found = 0;
|
||||
dm_list_iterate_items(seg2, &seg->lv->segments)
|
||||
if (sl->seg == seg2) {
|
||||
if (seg == seg2) {
|
||||
seg_found++;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!seg_found) {
|
||||
log_error("LV segment %s:%" PRIu32 "-%" PRIu32
|
||||
" is incorrectly listed as being used by LV %s",
|
||||
|
Loading…
Reference in New Issue
Block a user