1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 20:25:52 +03:00
lvm2/lib/cache
David Teigland 796461a912 vgrename: use process_each_vg
Use process_each_vg() to lock and read the old VG,
and then call the main vgrename code.

When real VG names are used (not a UUID in place of the
old name), the command still pre-locks the new name
(when strcmp wants it locked first), before calling
process_each_vg on the old name.

In the case where the old name is replaced with a UUID,
process_each_vg now translates that UUID into the real
VG name, which it locks and reads.  In this case, we
cannot do pre-locking to maintain lock ordering because
the old name is unknown.  So, in this case the strcmp
based lock ordering is suppressed and the old name is
always locked first.  This opens a remote chance for
lock ordering conflict between racing vgrenames between
two names where one or both commands use the UUID.
2015-12-14 14:26:47 -06:00
..
lvmcache.c vgrename: use process_each_vg 2015-12-14 14:26:47 -06:00
lvmcache.h vgrename: use process_each_vg 2015-12-14 14:26:47 -06:00
lvmetad.c lvmcache: new function to check if VG is foreign 2015-11-30 11:54:56 -06:00
lvmetad.h lvmcache: new function to check if VG is foreign 2015-11-30 11:54:56 -06:00