summary refs log tree commit diff stats
path: root/include/sysemu/block-backend.h
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2017-06-13 22:20:54 +0200
committerMax Reitz <mreitz@redhat.com>2017-07-11 17:45:01 +0200
commit3a691c50f10344b052ad70a4d0ed935276ccca3c (patch)
tree7987afc8abe63f577c59a11e698ea4536cf2c0d5 /include/sysemu/block-backend.h
parent7ea37c30660d4cd6aca21a324fabefe23b89f931 (diff)
downloadfocaccia-qemu-3a691c50f10344b052ad70a4d0ed935276ccca3c.tar.gz
focaccia-qemu-3a691c50f10344b052ad70a4d0ed935276ccca3c.zip
block: Add PreallocMode to blk_truncate()
blk_truncate() itself will pass that value to bdrv_truncate(), and all
callers of blk_truncate() just set the parameter to PREALLOC_MODE_OFF
for now.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20170613202107.10125-4-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include/sysemu/block-backend.h')
-rw-r--r--include/sysemu/block-backend.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index 1e05281fff..d9ea0cdb0f 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -223,7 +223,8 @@ int coroutine_fn blk_co_pwrite_zeroes(BlockBackend *blk, int64_t offset,
                                       int bytes, BdrvRequestFlags flags);
 int blk_pwrite_compressed(BlockBackend *blk, int64_t offset, const void *buf,
                           int bytes);
-int blk_truncate(BlockBackend *blk, int64_t offset, Error **errp);
+int blk_truncate(BlockBackend *blk, int64_t offset, PreallocMode prealloc,
+                 Error **errp);
 int blk_pdiscard(BlockBackend *blk, int64_t offset, int bytes);
 int blk_save_vmstate(BlockBackend *blk, const uint8_t *buf,
                      int64_t pos, int size);