Version 2.02.178 -
=====================================
+ Reload whole device stack when reinitilizing mirror log.
+ Mirrors without monitoring are WARNING and not blocking on error.
Detect too big region_size with clustered mirrors.
Fix evaluation of maximal region size for mirror log.
Enhance mirror log size estimation and use smaller size when possible.
* Initialize mirror log contents
*/
static int _init_mirror_log(struct cmd_context *cmd,
+ struct logical_volume *lock_holder,
struct logical_volume *log_lv, int in_sync,
struct dm_list *tagsl, int remove_on_failure)
{
}
/* store mirror log on disk(s) */
- if (!vg_write(log_lv->vg) || !vg_commit(log_lv->vg))
+ if (!lock_holder) {
+ if (!vg_write(log_lv->vg) || !vg_commit(log_lv->vg))
+ return_0;
+ } else if (!lv_update_and_reload((struct logical_volume*) lock_holder))
return_0;
if (!activate_lv_excl_local(cmd, log_lv)) {
/* Mirror with only 1 area is 'in sync'. */
if (new_area_count == 1 && is_temporary_mirror_layer(lv)) {
detached_log_lv = detach_mirror_log(mirrored_seg);
- if (!_init_mirror_log(lv->vg->cmd, detached_log_lv,
+ if (!_init_mirror_log(lv->vg->cmd,
+ (struct logical_volume*)lv_lock_holder(mirrored_seg->lv),
+ detached_log_lv,
1, &lv->tags, 0)) {
/* As a result, unnecessary sync may run after
* collapsing. But safe.*/
}
}
- if (!_init_mirror_log(cmd, log_lv, in_sync, &lv->tags, 1)) {
+ if (!_init_mirror_log(cmd, NULL, log_lv, in_sync, &lv->tags, 1)) {
log_error("Failed to initialise mirror log.");
return NULL;
}
goto out;
}
- if (!_init_mirror_log(cmd, log_lv, in_sync, &lv->tags, 1)) {
+ if (!_init_mirror_log(cmd, NULL, log_lv, in_sync, &lv->tags, 1)) {
log_error("Failed to initialise mirror log.");
log_lv = NULL;
goto out;