qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 1/2] qcow2: Make size_to_clusters() return uint64_t
Date: Wed, 9 Sep 2015 19:12:20 +0200	[thread overview]
Message-ID: <20150909171220.GG4860@noname.redhat.com> (raw)
In-Reply-To: <1441814987-27121-2-git-send-email-mreitz@redhat.com>

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 <qemu-stable@nongnu.org>
> Signed-off-by: Max Reitz <mreitz@redhat.com>

> @@ -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	other threads:[~2015-09-09 17:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-09 16:09 [Qemu-devel] [PATCH v2 0/2] qcow2: Make size_to_clusters() return uint64_t Max Reitz
2015-09-09 16:09 ` [Qemu-devel] [PATCH v2 1/2] " Max Reitz
2015-09-09 17:12   ` Kevin Wolf [this message]
2015-09-09 16:09 ` [Qemu-devel] [PATCH v2 2/2] iotests: Add test for checking large image files Max Reitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150909171220.GG4860@noname.redhat.com \
    --to=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).