qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH v2 1/2] qcow2: Make size_to_clusters() return ui


From: Kevin Wolf
Subject: Re: [Qemu-block] [PATCH v2 1/2] qcow2: Make size_to_clusters() return uint64_t
Date: Wed, 9 Sep 2015 19:12:20 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 09.09.2015 um 18:09 hat Max Reitz geschrieben:
> Sadly, some images may have more clusters than what can be represented
> using a plain int. We should be prepared for that case (in
> qcow2_check_refcounts() we actually were trying to catch that case, but
> since size_to_clusters() truncated the returned value, that check never
> did anything useful).
> 
> Cc: qemu-stable <address@hidden>
> Signed-off-by: Max Reitz <address@hidden>

> @@ -840,7 +843,7 @@ err:
>  static int count_cow_clusters(BDRVQcow2State *s, int nb_clusters,
>      uint64_t *l2_table, int l2_index)
>  {
> -    int i;
> +    uint64_t i;
>  
>      for (i = 0; i < nb_clusters; i++) {
>          uint64_t l2_entry = be64_to_cpu(l2_table[l2_index + i]);

As discussed on IRC, I removed this hunk, which isn't needed in v2.

Thanks, applied all to the block branch.

Kevin



reply via email to

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