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

Fix activation code to check for pre-existing mirror logs.

This commit is contained in:
Alasdair Kergon 2006-04-28 17:01:07 +00:00
parent 089ae9a58e
commit 2f1489a673
4 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.06 -
=================================
Fix activation code to check for pre-existing mirror logs.
Tighten region size validation.
Ignore empty strings in config files.
Require non-zero regionsize and document parameter on lvcreate man page.

View File

@ -616,6 +616,9 @@ static int _add_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree, struc
if (!_add_dev_to_dtree(dm, dtree, lv, "cow"))
return_0;
if (!_add_dev_to_dtree(dm, dtree, lv, "_mlog"))
return_0;
return 1;
}

View File

@ -159,7 +159,9 @@ char *build_dm_name(struct dm_pool *mem, const char *vgname,
_quote_hyphens(&out, lvname);
if (layer && *layer) {
*out++ = '-';
/* No hyphen if the layer begins with _ e.g. _mlog */
if (*layer != '_')
*out++ = '-';
_quote_hyphens(&out, layer);
}
*out = '\0';

View File

@ -1090,12 +1090,14 @@ int generate_log_name_format(struct volume_group *vg, const char *lv_name,
return 0;
}
/* FIXME I think we can cope without this. Cf. _add_lv_to_dtree()
if (find_lv_in_vg(vg, buffer) &&
lvm_snprintf(buffer, size, "%s_mlog_%%d",
lv_name) < 0) {
stack;
return 0;
}
*******/
return 1;
}