On 10/16/2014 09:27 AM, Max Reitz wrote:
>>> +memset(*refcount_table + old_nb_clusters, 0,
>>> + (*nb_clusters - old_nb_clusters) * sizeof(uint16_t));
>> Is this calculation unnecessarily hard-coded to refcount_order==4?
>
> While now in the process of editing this patch, no
Am 09.10.2014 um 01:09 schrieb Eric Blake:
On 08/29/2014 03:41 PM, Max Reitz wrote:
+ * cluster_count clusters; therefore, we have to allocate
+ * cluster_count - contiguous_free_clusters new clusters at the end of
+ * the image (which is the current value of cluster; not
Am 11.10.2014 um 20:56 schrieb Benoît Canet:
+int64_t first_free_cluster = 0, rt_ofs = -1, cluster = 0;
+int64_t rb_ofs, rb_start, rb_index;
Everytime a few day pass and I read rb_ofs and rt_ofs again I found these names
obfuscated. I know Linus says that C is a spartan language but thes
> +int64_t first_free_cluster = 0, rt_ofs = -1, cluster = 0;
> +int64_t rb_ofs, rb_start, rb_index;
Everytime a few day pass and I read rb_ofs and rt_ofs again I found these names
obfuscated. I know Linus says that C is a spartan language but these look odd.
Maybe refcount_block_offset, r
Am 10.10.2014 um 14:44 schrieb Benoît Canet:
+*nb_clusters = cluster + cluster_count - contiguous_free_clusters;
+*refcount_table = g_try_realloc(*refcount_table,
+*nb_clusters * sizeof(uint16_t));
Something tells me that these sizeof(uint1
Am 09.10.2014 um 01:09 schrieb Eric Blake:
On 08/29/2014 03:41 PM, Max Reitz wrote:
The previous commit introduced the "rebuild" variable to qcow2's
implementation of the image consistency check. Now make use of this by
adding a function which creates a completely new refcount structure
based so
> +*nb_clusters = cluster + cluster_count - contiguous_free_clusters;
> +*refcount_table = g_try_realloc(*refcount_table,
> +*nb_clusters * sizeof(uint16_t));
Something tells me that these sizeof(uint16_t) are connected to
s->refcount_order
On 08/29/2014 03:41 PM, Max Reitz wrote:
> The previous commit introduced the "rebuild" variable to qcow2's
> implementation of the image consistency check. Now make use of this by
> adding a function which creates a completely new refcount structure
> based solely on the in-memory information gath
The previous commit introduced the "rebuild" variable to qcow2's
implementation of the image consistency check. Now make use of this by
adding a function which creates a completely new refcount structure
based solely on the in-memory information gathered before.
The old refcount structure will be