From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1r8H-0002La-H8 for qemu-devel@nongnu.org; Mon, 08 Jun 2015 03:06:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1r8G-0000rk-KD for qemu-devel@nongnu.org; Mon, 08 Jun 2015 03:06:05 -0400 From: Fam Zheng Date: Mon, 8 Jun 2015 15:06:23 +0800 Message-Id: <1433747185-16797-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH 0/2] mirror: Allow detection of zeroes on source sectors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, Jeff Cody , Markus Armbruster , stefanha@redhat.com, pbonzini@redhat.com [These patches go on top of the "block: Mirror discarded sectors" series] Some protocols don't have an easy way to query sparseness, (e.g. block/nfs.c, block/nbd.c), for which block layer always reports block status as "allocated data". This will let mirror job do full provisioning even if data is actually sparse under the hood. With the new "detect-zeroes" option, we can let mirror job detect zeroes before sending the data to target, and use zero write when it is more efficient. Fam Fam Zheng (2): qapi: Add "detect-zeroes" option to drive-mirror iotests: Add test cases for drive-mirror "detect-zeroes" option block/mirror.c | 21 +++++++++++++++------ blockdev.c | 6 +++++- hmp.c | 2 +- include/block/block_int.h | 3 ++- qapi/block-core.json | 4 +++- qmp-commands.hx | 4 +++- tests/qemu-iotests/132 | 26 +++++++++++++++++++++++--- tests/qemu-iotests/132.out | 4 ++-- tests/qemu-iotests/iotests.py | 7 +++++++ 9 files changed, 61 insertions(+), 16 deletions(-) -- 2.4.2