aboutsummaryrefslogtreecommitdiff
path: root/block_int.h
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-02-15 17:18:04 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-02-15 17:18:04 -0600
commit65b31cc207b8ab949033870acf55bb124d12848e (patch)
treec7727e413b24d8ae024fea2ab455f8c49be02b20 /block_int.h
parentb2d4b3f7b8c8ad0519c4705a3b850446068e6946 (diff)
parentb867672884afc39b6537a8aa6aa2f20a5154bf4f (diff)
Merge remote-tracking branch 'kwolf/for-anthony' into staging
* kwolf/for-anthony: AHCI: Masking of IRQs actually masks them sheepdog: fix co_recv coroutine context AHCI: Fix port reset race rewrite QEMU_BUILD_BUG_ON qcow2: Keep unknown header extension when rewriting header qcow2: Update whole header at once vpc: Round up image size during fixed image creation vpc: Add support for Fixed Disk type iSCSI: add configuration variables for iSCSI qemu-io: add write -z option for bdrv_co_write_zeroes qed: add .bdrv_co_write_zeroes() support qed: replace is_write with flags field block: perform zero-detection during copy-on-read block: add .bdrv_co_write_zeroes() interface cutils: extract buffer_is_zero() from qemu-img.c
Diffstat (limited to 'block_int.h')
-rw-r--r--block_int.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/block_int.h b/block_int.h
index 7be2988ca7..7946cf66a1 100644
--- a/block_int.h
+++ b/block_int.h
@@ -131,6 +131,14 @@ struct BlockDriver {
int64_t sector_num, int nb_sectors, QEMUIOVector *qiov);
int coroutine_fn (*bdrv_co_writev)(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, QEMUIOVector *qiov);
+ /*
+ * Efficiently zero a region of the disk image. Typically an image format
+ * would use a compact metadata representation to implement this. This
+ * function pointer may be NULL and .bdrv_co_writev() will be called
+ * instead.
+ */
+ int coroutine_fn (*bdrv_co_write_zeroes)(BlockDriverState *bs,
+ int64_t sector_num, int nb_sectors);
int coroutine_fn (*bdrv_co_discard)(BlockDriverState *bs,
int64_t sector_num, int nb_sectors);
int coroutine_fn (*bdrv_co_is_allocated)(BlockDriverState *bs,