[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 03/17] qemu-img: sort block formats in help messa
From: |
Jeff Cody |
Subject: |
Re: [Qemu-devel] [PULL 03/17] qemu-img: sort block formats in help message |
Date: |
Wed, 14 May 2014 09:43:38 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, May 14, 2014 at 09:27:31AM -0400, Mike Day wrote:
> On Wed, May 14, 2014 at 8:35 AM, Stefan Hajnoczi <address@hidden> 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
- [Qemu-devel] [PULL 00/17] Block patches, Stefan Hajnoczi, 2014/05/09
- [Qemu-devel] [PULL 02/17] iotests: Use configured python, Stefan Hajnoczi, 2014/05/09
- [Qemu-devel] [PULL 01/17] qcow2: Fix alloc_clusters_noref() overflow detection, Stefan Hajnoczi, 2014/05/09
- [Qemu-devel] [PULL 03/17] qemu-img: sort block formats in help message, Stefan Hajnoczi, 2014/05/09
- Re: [Qemu-devel] [PULL 03/17] qemu-img: sort block formats in help message, Cornelia Huck, 2014/05/13
- Re: [Qemu-devel] [PULL 03/17] qemu-img: sort block formats in help message, Mike Day, 2014/05/13
- Re: [Qemu-devel] [PULL 03/17] qemu-img: sort block formats in help message, Stefan Hajnoczi, 2014/05/14
- Re: [Qemu-devel] [PULL 03/17] qemu-img: sort block formats in help message, Mike Day, 2014/05/14
- Re: [Qemu-devel] [PULL 03/17] qemu-img: sort block formats in help message, Fam Zheng, 2014/05/14
- Re: [Qemu-devel] [PULL 03/17] qemu-img: sort block formats in help message, Jeff Cody, 2014/05/14
- Re: [Qemu-devel] [PULL 03/17] qemu-img: sort block formats in help message,
Jeff Cody <=
- Re: [Qemu-devel] [PULL 03/17] qemu-img: sort block formats in help message, Mike Day, 2014/05/14
[Qemu-devel] [PULL 04/17] block/nfs: Check for NULL server part, Stefan Hajnoczi, 2014/05/09
[Qemu-devel] [PULL 06/17] qemu-img: Convert by cluster size if target is compressed, Stefan Hajnoczi, 2014/05/09
[Qemu-devel] [PULL 05/17] block/iscsi: bump year in copyright notice, Stefan Hajnoczi, 2014/05/09
[Qemu-devel] [PULL 07/17] vmdk: Implement .bdrv_write_compressed, Stefan Hajnoczi, 2014/05/09
[Qemu-devel] [PULL 08/17] vmdk: Implement .bdrv_get_info(), Stefan Hajnoczi, 2014/05/09
[Qemu-devel] [PULL 09/17] qemu-iotests: Test converting to streamOptimized from small cluster size, Stefan Hajnoczi, 2014/05/09
[Qemu-devel] [PULL 10/17] block: Fix open flags with BDRV_O_SNAPSHOT, Stefan Hajnoczi, 2014/05/09
[Qemu-devel] [PULL 11/17] vl.c: remove init_clocks call from main, Stefan Hajnoczi, 2014/05/09
[Qemu-devel] [PULL 12/17] gluster: Correctly propagate errors when volume isn't accessible, Stefan Hajnoczi, 2014/05/09