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

raid: add missing backups

Add backup() calls that were missing after successful update
of metadata.
This commit is contained in:
Zdenek Kabelac 2014-09-11 19:05:40 +02:00
parent 15ba2afdc2
commit dd1fa0e808
2 changed files with 14 additions and 5 deletions

View File

@ -1,5 +1,7 @@
Version 2.02.112 - Version 2.02.112 -
===================================== =====================================
Add missing backup of lvm2 metadata after some raid modifications.
Use vg memory pool for extent allocation.
Add allocation/physical_extent_size config option for default PE size of VGs. Add allocation/physical_extent_size config option for default PE size of VGs.
Introduce common code to modify metadate and reload updated LV. Introduce common code to modify metadate and reload updated LV.
Fix rename of active snapshot volume in cluster. Fix rename of active snapshot volume in cluster.

View File

@ -13,6 +13,7 @@
*/ */
#include "lib.h" #include "lib.h"
#include "archiver.h"
#include "metadata.h" #include "metadata.h"
#include "toolcontext.h" #include "toolcontext.h"
#include "segtype.h" #include "segtype.h"
@ -695,12 +696,14 @@ to be left for these sub-lvs.
rebuild_flag_cleared = 1; rebuild_flag_cleared = 1;
} }
} }
if (rebuild_flag_cleared && if (rebuild_flag_cleared) {
(!vg_write(lv->vg) || !vg_commit(lv->vg))) { if (!vg_write(lv->vg) || !vg_commit(lv->vg)) {
log_error("Failed to clear REBUILD flag for %s/%s components", log_error("Failed to clear REBUILD flag for %s/%s components",
lv->vg->name, lv->name); lv->vg->name, lv->name);
return 0; return 0;
} }
backup(lv->vg);
}
return 1; return 1;
@ -978,6 +981,8 @@ static int _raid_remove_images(struct logical_volume *lv,
return_0; return_0;
} }
backup(lv->vg);
return 1; return 1;
} }
@ -1149,6 +1154,8 @@ int lv_raid_split(struct logical_volume *lv, const char *split_name,
if (!vg_write(lv->vg) || !vg_commit(lv->vg)) if (!vg_write(lv->vg) || !vg_commit(lv->vg))
return_0; return_0;
backup(lv->vg);
return 1; return 1;
} }