]> sourceware.org Git - lvm2.git/commit
vgimportclone: fix non-duplicate PV with non-unique basevgname arg
authorDavid Teigland <teigland@redhat.com>
Thu, 9 Feb 2023 23:14:19 +0000 (17:14 -0600)
committerDavid Teigland <teigland@redhat.com>
Thu, 9 Feb 2023 23:37:22 +0000 (17:37 -0600)
commitbe124ae81027e8736106e4958bd2dfab971d6764
tree281729764d22b78a132d76e9ac669a8d2c0862f2
parent94f77a4d8d9737fca05fb4e451678ec440c68670
vgimportclone: fix non-duplicate PV with non-unique basevgname arg

Fix hang of vgimportclone command when:
the PV(s) being imported are not actually clones/duplicates, and
the -n vgname arg is the same as the current vgname.

(Not the intended use of the command, but it should still work.)

In this case, the old and new vgnames ended up being the same, when
the code expected they would be different.  A file lock on both the
old and new vgnames is used, so when both flocks are on the same
file, the second blocks indefinitely.

Fix the new vgname to be the old name plus a numeric suffix, which
is the expected result.
test/shell/vgimportclone.sh
tools/vgimportclone.c
This page took 0.034819 seconds and 5 git commands to generate.