[PATCH v8 1/3] block: introduce compress filter driver

2019-11-17 Thread Andrey Shinkevich
Allow writing all the data compressed through the filter driver. The written data will be aligned by the cluster size. Based on the QEMU current implementation, that data can be written to unallocated clusters only. May be used for a backup job. Suggested-by: Max Reitz Signed-off-by: Andrey

[PATCH v8 0/3] qcow2: advanced compression options

2019-11-17 Thread Andrey Shinkevich
The compression filter driver is introduced as suggested by Max. A sample usage of the filter can be found in the test #214. Now, multiple clusters can be written compressed. It is useful for the backup job. v8: The filter child was changed from the 'backing' to the 'file' one. Discussed in

[PATCH v8 3/3] tests/qemu-iotests: add case to write compressed data of multiple clusters

2019-11-17 Thread Andrey Shinkevich
Add the case to the iotest #214 that checks possibility of writing compressed data of more than one cluster size. The test case involves the compress filter driver showing a sample usage of that. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/214 | 43

[PATCH v8 2/3] qcow2: Allow writing compressed data of multiple clusters

2019-11-17 Thread Andrey Shinkevich
QEMU currently supports writing compressed data of the size equal to one cluster. This patch allows writing QCOW2 compressed data that exceed one cluster. Now, we split buffered data into separate clusters and write them compressed using the block/aio_task API. Suggested-by: Pavel Butsykin