From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biKz7-0006o9-3K for qemu-devel@nongnu.org; Fri, 09 Sep 2016 08:32:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biKz3-0002PK-1H for qemu-devel@nongnu.org; Fri, 09 Sep 2016 08:32:44 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:37201 helo=relay.sw.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biKz2-0002EZ-Lf for qemu-devel@nongnu.org; Fri, 09 Sep 2016 08:32:40 -0400 From: "Denis V. Lunev" Date: Fri, 9 Sep 2016 15:31:46 +0300 Message-Id: <1473424308-19812-1-git-send-email-den@openvz.org> Subject: [Qemu-devel] [PATCH v2 0/2] mirror: fix improperly filled copy_bitmap for mirror block job List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, "Denis V. Lunev" , Stefan Hajnoczi , Fam Zheng , Kevin Wolf , Max Reitz , Jeff Cody bdrv_is_allocated_above() returns true in the case even for completel zeroed areas as BDRV_BLOCK_ALLOCATED flag is set in both cases. The patch stops using bdrv_is_allocated_above() wrapper and switches to bdrv_get_block_status_above() to distinguish zeroed areas and areas with data to avoid extra IO operations if possible. Though this change requires some preparations in bdrv_get_block_status_above() performed in the patch (1). Changes from v1: - fixed assert in 041 test case (added patch 1) - fixed commit message - fixed status check to be on the safe side Signed-off-by: Denis V. Lunev CC: Stefan Hajnoczi CC: Fam Zheng CC: Kevin Wolf CC: Max Reitz CC: Jeff Cody Denis V. Lunev (2): block: sync bdrv_co_get_block_status_above() with bdrv_is_allocated_above() mirror: fix improperly filled copy_bitmap for mirror block job block/io.c | 26 ++++++++++++++++++++------ block/mirror.c | 18 ++++++++++++------ 2 files changed, 32 insertions(+), 12 deletions(-) -- 2.7.4