Received: from eggs.gnu.org ([208.118.235.92]:59272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkxRZ-0002SP-9w for qemu-devel@nongnu.org; Tue, 18 Dec 2012 08:42:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TkxRW-0000QO-Mw for qemu-devel@nongnu.org; Tue, 18 Dec 2012 08:42:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkxRW-0000QJ-FL for qemu-devel@nongnu.org; Tue, 18 Dec 2012 08:42:46 -0500 Date: Tue, 18 Dec 2012 14:42:39 +0100 From: Stefan Hajnoczi Message-ID: <20121218134239.GB6697@stefanha-thinkpad.redhat.com> References: <1353935123-24199-1-git-send-email-benoit@irqsave.net> <20121212161428.GC3478@irqsave.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20121212161428.GC3478@irqsave.net> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC V3 00/24] QCOW2 deduplication List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Beno=EEt?= Canet Cc: kwolf@redhat.com, qemu-devel@nongnu.org On Wed, Dec 12, 2012 at 05:14:28PM +0100, Beno=EEt Canet wrote: >=20 > Hi Stefan, >=20 > I have a few questions >=20 > 1) overlapping sequential sub-cluster writes >=20 > The current code pass most of the tests and behave well with a 4KB clus= ter sized > ext3 volume on the deduplicated image. >=20 > But less than cluster size sequentials writes are troublesome. > They fail with xfstest. > The problem is that the lock is released twice so that coherency is not > garanteed when two sub cluster size write are done on the same area. > (a deduplication attempt is done while the first write is yet not on di= sk) >=20 > My understanding is that a wait_for_overlapping_cluster_write function = called > before the writev loop in order to serialize such writes would solve th= e problem. > What do you this of this idea ? Yes, it's the same problem that copy-on-read has. We can serialize I/O requests, if necessary, in order to prevent them racing with each other. > 2) Internal snapshot > I don't fully understand if the current deduplication implementation is > compatible with internal snapshots. If not could it be done on a latter > patchset ? Let's figure out how hard it is to support internal snapshots for dedup. Internal snapshot creation is simple: 1. Copy the current L1 table for the internal snapshot. 2. Increment refcounts for L2 and data clusters. 3. Finalize the internal snapshot. Where do you see an issue - do you think the refcount manipulations you're doing for dedup might conflict with internal snapshots? Stefan