1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-07-30 23:41:55 +03:00

Use clustered mirror log with pvmove in clustered VGs, if available.

This commit is contained in:
Alasdair Kergon
2008-04-09 12:56:34 +00:00
parent 178e1df257
commit eb273c7c65
6 changed files with 63 additions and 26 deletions

View File

@ -412,19 +412,23 @@ int suspend_lvs(struct cmd_context *cmd, struct list *lvs)
}
/* Lock a list of LVs */
int activate_lvs_excl(struct cmd_context *cmd, struct list *lvs)
int activate_lvs(struct cmd_context *cmd, struct list *lvs, unsigned exclusive)
{
struct list *lvh;
struct lv_list *lvl;
list_iterate_items(lvl, lvs) {
if (!activate_lv_excl(cmd, lvl->lv)) {
if (!exclusive) {
if (!activate_lv(cmd, lvl->lv)) {
log_error("Failed to activate %s", lvl->lv->name);
return 0;
}
} else if (!activate_lv_excl(cmd, lvl->lv)) {
log_error("Failed to activate %s", lvl->lv->name);
list_uniterate(lvh, lvs, &lvl->list) {
lvl = list_item(lvh, struct lv_list);
activate_lv(cmd, lvl->lv);
}
return 0;
}
}