qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6] qcow2: Buffer L1 table in snapshot refcount


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH v6] qcow2: Buffer L1 table in snapshot refcount update
Date: Thu, 27 Nov 2014 16:09:26 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 2014-11-20 at 15:32, Max Reitz wrote:
On 2014-11-11 at 16:27, Max Reitz wrote:
From: Zhang Haoyu <address@hidden>

Buffer the active L1 table in qcow2_update_snapshot_refcount() in order
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 <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
---
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 patch
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)²

(got it? because i² = -1, ha-ha-haa)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]