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

Add missing lvrename mirrored log recursion in for_each_sub_lv.

This commit is contained in:
Alasdair Kergon 2011-11-04 01:31:23 +00:00
parent 1cae10a36c
commit 13dc67cda7
2 changed files with 11 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.89 -
==================================
Add missing lvrename mirrored log recursion in for_each_sub_lv.
Improve lv_extend stack reporting.
Increase virtual segment size instead of creating multiple segment list.
Add last_seg(lv) internal function.

View File

@ -2749,13 +2749,20 @@ int for_each_sub_lv(struct cmd_context *cmd, struct logical_volume *lv,
struct lv_segment *seg;
uint32_t s;
if (lv_is_cow(lv) && lv_is_virtual_origin(org = origin_from_cow(lv)))
if (lv_is_cow(lv) && lv_is_virtual_origin(org = origin_from_cow(lv))) {
if (!fn(cmd, org, data))
return_0;
if (!for_each_sub_lv(cmd, org, fn, data))
return_0;
}
dm_list_iterate_items(seg, &lv->segments) {
if (seg->log_lv && !fn(cmd, seg->log_lv, data))
return_0;
if (seg->log_lv) {
if (!fn(cmd, seg->log_lv, data))
return_0;
if (!for_each_sub_lv(cmd, seg->log_lv, fn, data))
return_0;
}
if (seg->pool_metadata_lv && !fn(cmd, seg->pool_metadata_lv, data))
return_0;
for (s = 0; s < seg->area_count; s++) {