qcow2_format.py: change Qcow2BitmapExt initialization method
commit991a02ca7f886fb7935d8d64e50ffe72af281e7c
authorAndrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Thu, 6 Aug 2020 19:35:49 +0000 (6 22:35 +0300)
committerEric Blake <eblake@redhat.com>
Fri, 21 Aug 2020 13:56:09 +0000 (21 08:56 -0500)
treea961ce6a4ee879cb4ed01266d4a6f0316e4e85b3
parent4539b3645bd5090873e2b01ea2d26899ac4c8682
qcow2_format.py: change Qcow2BitmapExt initialization method

There are two ways to initialize a class derived from Qcow2Struct:
1. Pass a block of binary data to the constructor.
2. Pass the file descriptor to allow reading the file from constructor.
Let's change the Qcow2BitmapExt initialization method from 1 to 2 to
support a scattered reading in the initialization chain.
The implementation comes with the patch that follows.

Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <1596742557-320265-4-git-send-email-andrey.shinkevich@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
tests/qemu-iotests/qcow2_format.py