mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Fix Bug 738832 - core to disk log conversion fails with internal error
This bug showed up when trying to add a log to a mirror whose images are on
multiple devices. This is an intra-release regression and no WHATS_NEW
entry will be added. The error was introduce in the following commit:
2d8a2f35c7
The solution is to recognise in _alloc_init that if there are no mirrors
or stripes specified, then 'new_extents' should be zero.
This commit is contained in:
parent
a514067448
commit
eb607100ef
@ -767,7 +767,10 @@ static struct alloc_handle *_alloc_init(struct cmd_context *cmd,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ah->new_extents = new_extents;
|
if (mirrors || stripes)
|
||||||
|
ah->new_extents = new_extents;
|
||||||
|
else
|
||||||
|
ah->new_extents = 0;
|
||||||
ah->area_count = area_count;
|
ah->area_count = area_count;
|
||||||
ah->parity_count = segtype->parity_devs;
|
ah->parity_count = segtype->parity_devs;
|
||||||
ah->region_size = region_size;
|
ah->region_size = region_size;
|
||||||
@ -801,7 +804,7 @@ static struct alloc_handle *_alloc_init(struct cmd_context *cmd,
|
|||||||
ah->log_area_count = metadata_area_count;
|
ah->log_area_count = metadata_area_count;
|
||||||
ah->log_len = !metadata_area_count ? 0 :
|
ah->log_len = !metadata_area_count ? 0 :
|
||||||
mirror_log_extents(ah->region_size, extent_size,
|
mirror_log_extents(ah->region_size, extent_size,
|
||||||
ah->new_extents / ah->area_multiple);
|
new_extents / ah->area_multiple);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (s = 0; s < alloc_count; s++)
|
for (s = 0; s < alloc_count; s++)
|
||||||
|
Loading…
Reference in New Issue
Block a user