1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-25 21:57:45 +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 83ca5e6d5c
commit 8ff2e245ac
3 changed files with 15 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.89 - Version 2.02.89 -
================================== ==================================
Support break for vgchange and vgrefresh operation.
Switch int to unsigned type for pvmetadatacopies for pv_create(). Switch int to unsigned type for pvmetadatacopies for pv_create().
Replace :space: with [\t ] for awk in vgimportclone (not widely supported). Replace :space: with [\t ] for awk in vgimportclone (not widely supported).
Begin using 64-bit status field flags. 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; struct lv_list *lvl;
int r = 1; 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_is_visible(lvl->lv))
if (!lv_refresh(cmd, lvl->lv)) if (!lv_refresh(cmd, lvl->lv))
r = 0; r = 0;
}
sigint_restore();
return r; return r;
} }

View File

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