LVM2/lib/metadata lv_manip.c
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: snitzer at sourceware.org 2010-02-17 23:36:45
Modified files:
lib/metadata : lv_manip.c
Log message:
Do not reload origin again in lv_remove_single() if it had a merging snapshot. vg_remove_snapshot() will have already performed the required reload.
lib/metadata/lv_manip.c +4 -2
@@ -2064,6 +2064,7 @@struct volume_group *vg;struct lvinfo info;struct logical_volume *origin =NULL ; +int was_merging =0 ; vg = lv->vg;
@@ -2118,6 +2119,7 @@if (lv_is_cow (lv)) { origin =origin_from_cow (lv); + was_merging =lv_is_merging_origin (origin);log_verbose ("Removing snapshot %s" , lv->name);/* vg_remove_snapshot() will preload origin if it was merging */ if (!vg_remove_snapshot (lv))
@@ -2140,8 +2142,8 @@if (!vg_write (vg) || !vg_commit (vg)) return_0; -/* If no snapshots left, reload without -real. */ -if (origin && (!lv_is_origin (origin))) { +/* If no snapshots left, and was not merging, reload without -real. */ +if (origin && (!lv_is_origin (origin) && !was_merging)) {if (!suspend_lv (cmd, origin)) {log_error ("Failed to refresh %s without snapshot." , origin->name);return 0 ;