On Tue, Nov 22, 2011 at 9:14 AM, Kevin Wolf wrote:
> Am 21.11.2011 17:47, schrieb Stefan Hajnoczi:
>> On Fri, Nov 18, 2011 at 6:29 PM, Kevin Wolf wrote:
>>> + /*
>>> + * Increase the refcounts of all clusters and make sure everything is
>>> + * stable on disk before updating the snapsh
Am 21.11.2011 17:47, schrieb Stefan Hajnoczi:
> On Fri, Nov 18, 2011 at 6:29 PM, Kevin Wolf wrote:
>> +/*
>> + * Increase the refcounts of all clusters and make sure everything is
>> + * stable on disk before updating the snapshot table to contain a
>> pointer
>> + * to the new L1
On Fri, Nov 18, 2011 at 6:29 PM, Kevin Wolf wrote:
> + /*
> + * Increase the refcounts of all clusters and make sure everything is
> + * stable on disk before updating the snapshot table to contain a pointer
> + * to the new L1 table.
> + */
> + ret = qcow2_update_snapshot_re
Increase refcounts only after allocating a new L1 table has succeeded in
order to make leaks less likely. If writing the snapshot table fails,
revert in-memory state to be consistent with that on disk.
While at it, make it return the real error codes instead of -1.
Signed-off-by: Kevin Wolf
---