qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Cody <jcody@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, kwolf@redhat.com, armbru@redhat.com,
	qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 3/4] qcow2: Drop debugging dump_refcounts()
Date: Mon, 7 Aug 2017 19:33:59 -0400	[thread overview]
Message-ID: <20170807233359.GN22129@localhost.localdomain> (raw)
In-Reply-To: <20170807203007.19033-4-eblake@redhat.com>

On Mon, Aug 07, 2017 at 03:30:06PM -0500, Eric Blake wrote:
> It's been #if 0'd since its introduction in 2006, commit 585f8587.
> We can revive dead code if we need it, but in the meantime, it has
> bit-rotted (for example, not checking for failure in bdrv_getlength()).
> 
> Signed-off-by: Eric Blake <eblake@redhat.com>


Reviewed-by: Jeff Cody <jcody@redhat.com>


> ---
>  block/qcow2.c | 21 ---------------------
>  1 file changed, 21 deletions(-)
> 
> diff --git a/block/qcow2.c b/block/qcow2.c
> index d7c600b5a2..99407403ea 100644
> --- a/block/qcow2.c
> +++ b/block/qcow2.c
> @@ -3798,27 +3798,6 @@ static ImageInfoSpecific *qcow2_get_specific_info(BlockDriverState *bs)
>      return spec_info;
>  }
> 
> -#if 0
> -static void dump_refcounts(BlockDriverState *bs)
> -{
> -    BDRVQcow2State *s = bs->opaque;
> -    int64_t nb_clusters, k, k1, size;
> -    int refcount;
> -
> -    size = bdrv_getlength(bs->file->bs);
> -    nb_clusters = size_to_clusters(s, size);
> -    for(k = 0; k < nb_clusters;) {
> -        k1 = k;
> -        refcount = get_refcount(bs, k);
> -        k++;
> -        while (k < nb_clusters && get_refcount(bs, k) == refcount)
> -            k++;
> -        printf("%" PRId64 ": refcount=%d nb=%" PRId64 "\n", k, refcount,
> -               k - k1);
> -    }
> -}
> -#endif
> -
>  static int qcow2_save_vmstate(BlockDriverState *bs, QEMUIOVector *qiov,
>                                int64_t pos)
>  {
> -- 
> 2.13.4
> 
> 

  parent reply	other threads:[~2017-08-07 23:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07 20:30 [Qemu-devel] [PATCH for-2.10 0/4] More blk_getlength() fixes Eric Blake
2017-08-07 20:30 ` [Qemu-devel] [PATCH 1/4] vpc: Check failure of bdrv_getlength() Eric Blake
2017-08-07 20:43   ` Philippe Mathieu-Daudé
2017-08-07 23:32   ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-08-08  8:30   ` [Qemu-devel] " Kevin Wolf
2017-08-07 20:30 ` [Qemu-devel] [PATCH 2/4] qcow: Check failure of bdrv_getlength() and bdrv_truncate() Eric Blake
2017-08-07 20:51   ` Philippe Mathieu-Daudé
2017-08-07 23:33   ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-08-07 23:35   ` Jeff Cody
2017-08-08  8:28   ` [Qemu-devel] " Kevin Wolf
2017-08-08 14:16     ` Eric Blake
2017-08-07 20:30 ` [Qemu-devel] [PATCH 3/4] qcow2: Drop debugging dump_refcounts() Eric Blake
2017-08-07 20:44   ` Philippe Mathieu-Daudé
2017-08-07 23:33   ` Jeff Cody [this message]
2017-08-08  8:32   ` Kevin Wolf
2017-08-07 20:30 ` [Qemu-devel] [PATCH 4/4] qcow2: Check failure of bdrv_getlength() Eric Blake
2017-08-07 20:47   ` Philippe Mathieu-Daudé
2017-08-07 23:34   ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-08-08  8:32   ` [Qemu-devel] " Kevin Wolf
2017-08-07 22:58 ` [Qemu-devel] [Qemu-block] [PATCH for-2.10 0/4] More blk_getlength() fixes John Snow

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=20170807233359.GN22129@localhost.localdomain \
    --to=jcody@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=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).