1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-04-01 18:50:41 +03:00

snapshot: update merging fix

Activation is needed only for clustered VG.
For non-clustered VG skip activation, since deactivate_lv()
is called without problems (no testing for lock presence).

(updates f6ded62291682e40c7976d27e48915d9d1538940)
This commit is contained in:
Zdenek Kabelac 2013-07-23 15:15:04 +02:00
parent 6311be29e4
commit 373f95a921

View File

@ -298,10 +298,12 @@ int vg_remove_snapshot(struct logical_volume *cow)
}
/*
* For merged snapshot we activate cow so it can clean
* left table entries and deactivate_lv() follows shortly.
* For merged snapshot and clustered VG activate cow LV so
* the following call to deactivate_lv() can clean-up table
* entries. For this clustered lock need to be held.
*/
if (merging_snapshot && !activate_lv(cow->vg->cmd, cow)) {
if (vg_is_clustered(cow->vg) &&
merging_snapshot && !activate_lv(cow->vg->cmd, cow)) {
log_error("Failed to activate %s.", cow->name);
return 0;
}