qemu-devel
[Top][All Lists]
Advanced

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

RE: [Qemu-devel][PATCH,RFC] Zero cluster dedup


From: Shahar Frank
Subject: RE: [Qemu-devel][PATCH,RFC] Zero cluster dedup
Date: Wed, 3 Sep 2008 00:35:19 -0700

> -----Original Message-----
> From: Laurent Vivier [mailto:address@hidden
> Sent: Wednesday, September 03, 2008 10:10 AM
> To: address@hidden
> Cc: Shahar Frank
> Subject: Re: [Qemu-devel][PATCH,RFC] Zero cluster dedup
> 
> 
> Is it really needed to have a shared zero page ?
> 
> When I read qcow_read() and qcow_aio_read_cb() I see:
> 
> if (!cluster_offset) {
> ...
> memset(buf, 0, 512 * n);
> ...
> }
> and so I think you have just to clear the l2_table entry for the given
> clusters (and free them).

You are correct if this is a standalone image i.e. without backing file. If the 
image has a backing file, a zero mapping is interpreted as "read it from the 
backing file at the same (logical) offset". 

I could add some other special value for it but I wanted to preserve backwards 
compatibility, and it also looks "dirty" to have several special values for 
such features.

> 
> Regards,
> Laurent
> --
> ----------------- address@hidden  ------------------
>   "La perfection est atteinte non quand il ne reste rien à
> ajouter mais quand il ne reste rien à enlever." Saint Exupéry

Shahar




reply via email to

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