]> git.ipfire.org Git - thirdparty/qemu.git/commit
block/rbd: Attempt to parse legacy filenames
authorJeff Cody <jcody@redhat.com>
Tue, 11 Sep 2018 22:32:31 +0000 (18:32 -0400)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 27 Mar 2019 05:38:38 +0000 (00:38 -0500)
commit0bc2dc73573175920aba61c0358a42b8e77c0973
treebda2da856ea74109a5ff0acdad1ea4186a2ff8fe
parent22e766bcf3a5d1a1a716206161881cb6b746e3c2
block/rbd: Attempt to parse legacy filenames

When we converted rbd to get rid of the older key/value-centric
encoding format, we broke compatibility with image files with backing
file strings encoded in the old format.

This leaves a bit of an ugly conundrum, and a hacky solution.

If the initial attempt to parse the "proper" options fails, it assumes
that we may have an older key/value encoded filename.  Fall back to
attempting to parse the filename, and extract the required options from
it.  If that fails, pass along the original error message.

We do not support mixed modern usage alongside legacy keyvalue pair
usage.

A deprecation warning has been added, although care should be taken
when actually deprecating since the impact is not limited to
commandline or qapi usage, but also opening existing images.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Message-id: 15b332e5432ad069441f7275a46080f465d789a0.1536704901.git.jcody@redhat.com
Signed-off-by: Jeff Cody <jcody@redhat.com>
(cherry picked from commit 084d1d13bdb753d558b991996e7686c077bd6d80)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/rbd.c