qcow2: Split upgrade/downgrade paths for amend
commit1038bbb803b1630a5d9b91d185b5957a25d4710d
authorMax Reitz <mreitz@redhat.com>
Mon, 27 Jul 2015 15:51:35 +0000 (27 17:51 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 18 Dec 2015 13:34:43 +0000 (18 14:34 +0100)
treea33b854a9ebd215b8ab93ef06257829de4072ac0
parent164e0f89cc825bf2a83b20451643db333d2891a7
qcow2: Split upgrade/downgrade paths for amend

If the image version should be upgraded, that is the first we should do;
if it should be downgraded, that is the last we should do. So split the
version change block into an upgrade part at the start and a downgrade
part at the end.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2.c