mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
qed: add .bdrv_co_write_zeroes() support
Zero writes are a dedicated interface for writing regions of zeroes into the image file. If clusters are not yet allocated it is possible to use an efficient metadata representation which keeps the image file compact and does not store individual zero bytes. Implementing this for the QED image format is fairly straightforward. The only issue is that when a zero write touches an existing cluster we have to allocate a bounce buffer and perform a regular write. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
6e4f59bd0d
commit
0e71be1932
2 changed files with 103 additions and 8 deletions
|
@ -125,6 +125,7 @@ typedef struct QEDRequest {
|
|||
|
||||
enum {
|
||||
QED_AIOCB_WRITE = 0x0001, /* read or write? */
|
||||
QED_AIOCB_ZERO = 0x0002, /* zero write, used with QED_AIOCB_WRITE */
|
||||
};
|
||||
|
||||
typedef struct QEDAIOCB {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue