From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xu0hM-0000vO-Af for qemu-devel@nongnu.org; Thu, 27 Nov 2014 10:09:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xu0hH-0003qi-Ow for qemu-devel@nongnu.org; Thu, 27 Nov 2014 10:09:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xu0hH-0003qZ-HL for qemu-devel@nongnu.org; Thu, 27 Nov 2014 10:09:31 -0500 Message-ID: <54773EA6.7010201@redhat.com> Date: Thu, 27 Nov 2014 16:09:26 +0100 From: Max Reitz MIME-Version: 1.0 References: <1415719671-16257-1-git-send-email-mreitz@redhat.com> <546DFB6F.3020200@redhat.com> In-Reply-To: <546DFB6F.3020200@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v6] qcow2: Buffer L1 table in snapshot refcount update List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Zhang Haoyu , Stefan Hajnoczi On 2014-11-20 at 15:32, Max Reitz wrote: > On 2014-11-11 at 16:27, Max Reitz wrote: >> From: Zhang Haoyu >> >> Buffer the active L1 table in qcow2_update_snapshot_refcount() in orde= r >> to prevent in-place conversion of the L1 table buffer in the >> BDRVQcowState to big endian and back, which would lead to data >> corruption if that buffer was accessed concurrently. This should not >> happen but better being safe than sorry. >> >> Signed-off-by: Zhang Haoyu >> Signed-off-by: Max Reitz >> --- >> v6 for "snapshot: use local variable to bdrv_pwrite_sync L1 table" (I >> changed the commit message wording to make it more clear what this pat= ch >> does and why we want it). >> >> Changes in v6: >> - Only copy the local buffer back into s->l1_table if we are indeed >> accessing the local L1 table >> - Use qemu_vfree() instead of g_free() >> --- >> block/qcow2-refcount.c | 30 ++++++++++++++---------------- >> 1 file changed, 14 insertions(+), 16 deletions(-) > > Ping -(Png)=B2 (got it? because i=B2 =3D -1, ha-ha-haa)