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

Support break for vgchange and vgrefresh operation

Allow to break some lengthy vgchange and vgrefresh operation.
This commit is contained in:
Zdenek Kabelac 2011-09-07 08:41:47 +00:00
parent beecb1e160
commit 4144938350
3 changed files with 15 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.89 -
==================================
Support break for vgchange and vgrefresh operation.
Switch int to unsigned type for pvmetadatacopies for pv_create().
Replace :space: with [\t ] for awk in vgimportclone (not widely supported).
Begin using 64-bit status field flags.

View File

@ -1323,10 +1323,17 @@ int vg_refresh_visible(struct cmd_context *cmd, struct volume_group *vg)
struct lv_list *lvl;
int r = 1;
dm_list_iterate_items(lvl, &vg->lvs)
sigint_allow();
dm_list_iterate_items(lvl, &vg->lvs) {
if (sigint_caught())
return_0;
if (lv_is_visible(lvl->lv))
if (!lv_refresh(cmd, lvl->lv))
r = 0;
}
sigint_restore();
return r;
}

View File

@ -90,7 +90,11 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd,
struct logical_volume *lv;
int count = 0, expected_count = 0;
sigint_allow();
dm_list_iterate_items(lvl, &vg->lvs) {
if (sigint_caught())
return_0;
lv = lvl->lv;
if (!lv_is_visible(lv))
@ -160,6 +164,8 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd,
count++;
}
sigint_restore();
if (expected_count)
log_verbose("%s %d logical volumes in volume group %s",
(activate == CHANGE_AN || activate == CHANGE_ALN)?