Hi all! If we want to do incremental backups with help of copy-before-write filter bitmap parameter introduced in my in-flight series "[PATCH v4 00/18] Make image fleecing more usable", we actually need to create filter, insert it into graph and do some operations with bitmaps in one transaction.
So, here is basic support for blockdev-add transaction, which may be useful for any scenarios. Also, I'll need to resend my "[PATCH RFC v2 0/4] blockdev-replace" with transaction support as well. Why I say that support is "basic"? Ideally we want an ability to call several blockdev-add / blockdev-replace commands not updating the permission and only then update permissions for all touched nodes. That is more flexible and will allow more strict and simple permission requirements in filter drivers. Still this means to implement bdrv_open() transaction action (using Transaction API) which doesn't update permissions (like most of internal graph update functions works now). That's of course is more complicated than this patch. So, let's start with something simple. Vladimir Sementsov-Ogievskiy (2): block: transaction support for blockdev-add iotests: add blockdev-add-transaction qapi/transaction.json | 11 +++ blockdev.c | 80 +++++++++++++------ .../tests/blockdev-add-transaction | 52 ++++++++++++ .../tests/blockdev-add-transaction.out | 6 ++ 4 files changed, 124 insertions(+), 25 deletions(-) create mode 100755 tests/qemu-iotests/tests/blockdev-add-transaction create mode 100644 tests/qemu-iotests/tests/blockdev-add-transaction.out -- 2.31.1