]> 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)
committerJeff Cody <jcody@redhat.com>
Tue, 25 Sep 2018 03:46:05 +0000 (23:46 -0400)
commit084d1d13bdb753d558b991996e7686c077bd6d80
treed0cde7831cd932dc14732fa261374355a8973f4a
parentf24b03b56cdb28d753b4ff9ae210d555f14cb0d8
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>
block/rbd.c