Received: from eggs.gnu.org ([2001:4830:134:3::10]:45853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGNGK-0003sS-23 for qemu-devel@nongnu.org; Tue, 05 Jan 2016 03:46:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGNGJ-00057F-A4 for qemu-devel@nongnu.org; Tue, 05 Jan 2016 03:46:39 -0500 From: Fam Zheng Date: Tue, 5 Jan 2016 16:46:18 +0800 Message-Id: <1451983580-10561-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH v9 0/2] mirror: Improve zero write and discard List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , pbonzini@redhat.com, Jeff Cody , qemu-block@nongnu.org, mreitz@redhat.com v9: Fix the one bug Max found: "shrink *= chunk_sectors". v8: Rebase onto master (didn't pick up Max's rev-by due to non-trivial code change). The conflict is around removed lines about "max_iov" and "IOV_MAX" due to commit 3515727f3, but this also reveals this series forgot that check. So this revision adds it back: - Two new fields in MirrorBlockJob are added to cache size info: target_cluster_sectors and max_iov. - mirror_align_cow compares nb_chunks and max_iov, and cut the tail appropriately. - The orphan trace point is removed from trace-events. Patch 1 rewrites mirror_iteration. Patch 2 is a small DRY cleaning up. The main benefit is copying unallocated sectors (both zeroed and discarded) doesn't go through the iov setup loop, as they don't need it. Fam Zheng (2): mirror: Rewrite mirror_iteration mirror: Add mirror_wait_for_io block/mirror.c | 365 +++++++++++++++++++++++++++++++++++---------------------- trace-events | 1 - 2 files changed, 225 insertions(+), 141 deletions(-) -- 2.4.3