From patchwork Fri Sep 13 10:25:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [05/12] block: add logical block provisioning information to BlockDriverInfo X-Patchwork-Submitter: Peter Lieven X-Patchwork-Id: 274714 Message-Id: <1379067909-22984-6-git-send-email-pl@kamp.de> To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, ronniesahlberg@gmail.com, Peter Lieven , stefanha@redhat.com, anthony@codemonkey.ws, pbonzini@redhat.com Date: Fri, 13 Sep 2013 12:25:02 +0200 From: Peter Lieven List-Id: Signed-off-by: Peter Lieven --- include/block/block.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/block/block.h b/include/block/block.h index 599de7d..ee17048 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -18,6 +18,15 @@ typedef struct BlockDriverInfo { /* offset at which the VM state can be saved (0 if not possible) */ int64_t vm_state_offset; bool is_dirty; + /* do discarded blocks read back as zeroes? */ + bool discard_zeroes; + /* is write zeroes optimized by a discard/unmap operation? + * this requires support for the BDRV_REQ_MAY_UNMAP flag. */ + bool discard_write_zeroes; + /* maximum number of sectors that can be discarded at once */ + int max_discard; + /* maximum number of sectors that can zeroized at once */ + int max_write_zeroes; } BlockDriverInfo; typedef struct BlockFragInfo {