aboutsummaryrefslogtreecommitdiff
path: root/block/qed.h
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-02-07 13:27:28 +0000
committerKevin Wolf <kwolf@redhat.com>2012-02-09 16:17:50 +0100
commit0e71be1932adfad27d564675f89a468fc8b92b1f (patch)
tree38557d85c26ec854554dc1a7eef289823104347e /block/qed.h
parent6e4f59bd0d69f0a7aa4010b49a5c49a01987b9d8 (diff)
downloadqemu-0e71be1932adfad27d564675f89a468fc8b92b1f.zip
qemu-0e71be1932adfad27d564675f89a468fc8b92b1f.tar.gz
qemu-0e71be1932adfad27d564675f89a468fc8b92b1f.tar.bz2
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>
Diffstat (limited to 'block/qed.h')
-rw-r--r--block/qed.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/qed.h b/block/qed.h
index abed147..62624a1 100644
--- a/block/qed.h
+++ b/block/qed.h
@@ -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 {