mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
lvmlockd: use transient LV lock when creating snapshot
Creating a snapshot was using a persistent LV lock on the origin, so if the origin LV was inactive at the time of the snapshot the LV lock would remain. (Running lvchange -an on the inactive LV would clear the LV lock.) Use a transient LV lock so it will be dropped if it was not locked previously.
This commit is contained in:
parent
a5b1b52903
commit
dd0fdd846d
@ -2679,7 +2679,7 @@ int lockd_init_lv(struct cmd_context *cmd, struct volume_group *vg, struct logic
|
||||
log_error("Failed to find origin LV %s/%s", vg->name, lp->origin_name);
|
||||
return 0;
|
||||
}
|
||||
if (!lockd_lv(cmd, origin_lv, "ex", LDLV_PERSISTENT)) {
|
||||
if (!lockd_lv(cmd, origin_lv, "ex", 0)) {
|
||||
log_error("Failed to lock origin LV %s/%s", vg->name, lp->origin_name);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user