qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC V6 27/33] qcow2: Adapt checking of QCOW_OFLAG_COPI


From: Benoît Canet
Subject: Re: [Qemu-devel] [RFC V6 27/33] qcow2: Adapt checking of QCOW_OFLAG_COPIED for dedup.
Date: Wed, 27 Feb 2013 16:00:28 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

> > -                if ((refcount == 1) != ((l2_entry & QCOW_OFLAG_COPIED) != 
> > 0)) {
> > +                if (!s->has_dedup &&
> > +                    (refcount == 1) != ((l2_entry & QCOW_OFLAG_COPIED) != 
> > 0)) {
> > +                    fprintf(stderr, "ERROR OFLAG_COPIED: offset=%"
> > +                        PRIx64 " refcount=%d\n", l2_entry, refcount);
> > +                    res->corruptions++;
> > +                }
> 
> Why is this warning suppressed when dedup is enabled?  The meaning of
> QCOW_OFLAG_COPIED is that refcount == 1.  If this invariant is violated
> then something is wrong.

When deduplication is done refcount will be bigger than one and
QCOW_OFLAG_COPIED will be cleared.

Then if enough logical clustere pointing to the same physical cluster are
rewritten with something else the refcount will goes down back to one.

But this time QCOW_OFLAG_COPIED can be set back so this equality won't be true.

Best regards

Benoît



reply via email to

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