1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Add RAID metadata devices to considered devices in _add_lv_to_dtree.

_add_lv_to_dtree must also add RAID metadata devices.
This commit is contained in:
Jonathan Earl Brassow 2011-08-11 04:18:17 +00:00
parent 66d9675559
commit ff58e019d8
2 changed files with 13 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.87 -
===============================
Add RAID metadata devices to considered devices in _add_lv_to_dtree.
Fix renaming of RAID logical volumes.
Replace free_vg with release_vg and move it to vg.c.
Remove INCONSISTENT_VG flag from the code.

View File

@ -1060,9 +1060,12 @@ static int _add_partial_replicator_to_dtree(struct dev_manager *dm,
/*
* Add LV and any known dependencies
*/
static int _add_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree, struct logical_volume *lv, int origin_only)
static int _add_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree,
struct logical_volume *lv, int origin_only)
{
uint32_t s;
struct seg_list *sl;
struct lv_segment *seg = first_seg(lv);
if (!origin_only && !_add_dev_to_dtree(dm, dtree, lv, NULL))
return_0;
@ -1074,10 +1077,16 @@ static int _add_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree, struc
if (!origin_only && !_add_dev_to_dtree(dm, dtree, lv, "cow"))
return_0;
if ((lv->status & MIRRORED) && first_seg(lv)->log_lv &&
!_add_dev_to_dtree(dm, dtree, first_seg(lv)->log_lv, NULL))
if ((lv->status & MIRRORED) && seg->log_lv &&
!_add_dev_to_dtree(dm, dtree, seg->log_lv, NULL))
return_0;
if (lv->status & RAID)
for (s = 0; s < seg->area_count; s++)
if (!_add_lv_to_dtree(dm, dtree,
seg_metalv(seg, s), origin_only))
return_0;
/* Add any LVs referencing a PVMOVE LV unless told not to. */
if (dm->track_pvmove_deps && lv->status & PVMOVE)
dm_list_iterate_items(sl, &lv->segs_using_this_lv)