diff options
author | Petr Rockai <me@mornfall.net> | 2013-03-17 21:29:58 +0100 |
---|---|---|
committer | Petr Rockai <prockai@redhat.com> | 2013-06-10 17:26:38 +0200 |
commit | f65dd341a5617aeffe18127ba5bd7ca5ca4d8477 (patch) | |
tree | 64d3da97d4ff4ddc4b51da73741093cde4b37926 /tools/vgcfgrestore.c | |
parent | 5d5f2306bd4635cdc7e97a6a875384a00c9be460 (diff) | |
download | lvm2-f65dd341a5617aeffe18127ba5bd7ca5ca4d8477.tar.gz |
locking: Make it possible to pass down an LV to activation code.
Previously, we have relied on UUIDs alone, and on lvmcache to make getting a
"new copy" of VG metadata fast. If the code which triggers the activation has
the correct VG metadata at hand (the version which is currently on disk), it can
now hand it to the activation code directly.
Diffstat (limited to 'tools/vgcfgrestore.c')
-rw-r--r-- | tools/vgcfgrestore.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/vgcfgrestore.c b/tools/vgcfgrestore.c index 20ca16b35..618fa7e71 100644 --- a/tools/vgcfgrestore.c +++ b/tools/vgcfgrestore.c @@ -47,12 +47,12 @@ int vgcfgrestore(struct cmd_context *cmd, int argc, char **argv) lvmcache_seed_infos_from_lvmetad(cmd); - if (!lock_vol(cmd, vg_name, LCK_VG_WRITE)) { + if (!lock_vol(cmd, vg_name, LCK_VG_WRITE, NULL)) { log_error("Unable to lock volume group %s", vg_name); return ECMD_FAILED; } - if (!lock_vol(cmd, VG_ORPHANS, LCK_VG_WRITE)) { + if (!lock_vol(cmd, VG_ORPHANS, LCK_VG_WRITE, NULL)) { log_error("Unable to lock orphans"); unlock_vg(cmd, vg_name); return ECMD_FAILED; |