From: Jeff Cody <jcody@redhat.com>
To: Mike Day <ncmike@ncultra.org>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PULL 03/17] qemu-img: sort block formats in help message
Date: Wed, 14 May 2014 09:43:38 -0400 [thread overview]
Message-ID: <20140514134338.GE8452@localhost.localdomain> (raw)
In-Reply-To: <CAGaKXu1syqAfv6yix_TykTVkZ8Po3yapktnrbVK4zax3zYbZVA@mail.gmail.com>
On Wed, May 14, 2014 at 09:27:31AM -0400, Mike Day wrote:
> On Wed, May 14, 2014 at 8:35 AM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> > Jeff Cody recently wanted to eliminate duplicate entries in the list. I
> > thought part of your intention was to address the duplicates with your
> > patch.
> >
> > We can back out the sequence API if it's not supported on older glib but
> > it would be nice to eliminate duplicates later, too.
>
> I agree. I can submit an additional patch that uses an older API.
> What, exactly is the cause of duplicate entries in the list? I've only
> seen it one time but its disconcerting when it happens.
>
Some block drivers register multiple drivers for a given format name,
for instance, gluster:
https://github.com/qemu/qemu/blob/master/block/gluster.c#L818
static void bdrv_gluster_init(void)
{
bdrv_register(&bdrv_gluster_rdma);
bdrv_register(&bdrv_gluster_unix);
bdrv_register(&bdrv_gluster_tcp);
bdrv_register(&bdrv_gluster);
}
Each of those drivers has a format_name of "gluster", in this example.
In qemu-img, it lists the supported formats by simply calling
bdrv_iterate_format(), which calls a callback function for each
format_name in the driver list.
Prior to a recent commit, this function did not make distinction on
duplicates. As of commit e855e4fb7, duplicates are not longer printed
in the help message:
e855e4fb7: Ignore duplicate or NULL format_name in bdrv_iterate_format):
https://github.com/qemu/qemu/commit/e855e4fb7b97f7f605e1f44427b98022e39e6f8f#diff-ea36ba0f79150cc299732696a069caba
next prev parent reply other threads:[~2014-05-14 13:44 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 19:03 [Qemu-devel] [PULL 00/17] Block patches Stefan Hajnoczi
2014-05-09 19:03 ` [Qemu-devel] [PULL 01/17] qcow2: Fix alloc_clusters_noref() overflow detection Stefan Hajnoczi
2014-05-09 19:03 ` [Qemu-devel] [PULL 02/17] iotests: Use configured python Stefan Hajnoczi
2014-05-09 19:03 ` [Qemu-devel] [PULL 03/17] qemu-img: sort block formats in help message Stefan Hajnoczi
2014-05-13 14:18 ` Cornelia Huck
2014-05-13 15:40 ` Mike Day
2014-05-14 12:35 ` Stefan Hajnoczi
2014-05-14 13:27 ` Mike Day
2014-05-14 13:40 ` Fam Zheng
2014-05-14 13:46 ` Jeff Cody
2014-05-14 13:43 ` Jeff Cody [this message]
2014-05-14 14:03 ` Mike Day
2014-05-09 19:03 ` [Qemu-devel] [PULL 04/17] block/nfs: Check for NULL server part Stefan Hajnoczi
2014-05-09 19:03 ` [Qemu-devel] [PULL 05/17] block/iscsi: bump year in copyright notice Stefan Hajnoczi
2014-05-09 19:03 ` [Qemu-devel] [PULL 06/17] qemu-img: Convert by cluster size if target is compressed Stefan Hajnoczi
2014-05-09 19:03 ` [Qemu-devel] [PULL 07/17] vmdk: Implement .bdrv_write_compressed Stefan Hajnoczi
2014-05-09 19:03 ` [Qemu-devel] [PULL 08/17] vmdk: Implement .bdrv_get_info() Stefan Hajnoczi
2014-05-09 19:03 ` [Qemu-devel] [PULL 09/17] qemu-iotests: Test converting to streamOptimized from small cluster size Stefan Hajnoczi
2014-05-09 19:03 ` [Qemu-devel] [PULL 10/17] block: Fix open flags with BDRV_O_SNAPSHOT Stefan Hajnoczi
2014-05-09 19:03 ` [Qemu-devel] [PULL 11/17] vl.c: remove init_clocks call from main Stefan Hajnoczi
2014-05-09 19:03 ` [Qemu-devel] [PULL 12/17] gluster: Correctly propagate errors when volume isn't accessible Stefan Hajnoczi
2014-05-12 16:07 ` Eric Blake
2014-05-14 12:36 ` Stefan Hajnoczi
2014-05-14 12:52 ` Peter Krempa
2014-05-09 19:03 ` [Qemu-devel] [PULL 13/17] block/raw-posix: Try both FIEMAP and SEEK_HOLE Stefan Hajnoczi
2014-05-09 19:03 ` [Qemu-devel] [PULL 14/17] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests Stefan Hajnoczi
2014-05-09 19:03 ` [Qemu-devel] [PULL 15/17] block: qemu-iotests - update 085 to use common.qemu Stefan Hajnoczi
2014-05-09 19:03 ` [Qemu-devel] [PULL 16/17] block: qemu-iotests - test for live migration Stefan Hajnoczi
2014-05-09 19:03 ` [Qemu-devel] [PULL 17/17] glib: fix g_poll early timeout on windows Stefan Hajnoczi
2014-05-13 10:32 ` [Qemu-devel] [PULL 00/17] Block patches Peter Maydell
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=20140514134338.GE8452@localhost.localdomain \
--to=jcody@redhat.com \
--cc=cornelia.huck@de.ibm.com \
--cc=ncmike@ncultra.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=stefanha@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.