Re: [Qemu-devel] [PATCH 2/2] xen: Don't peek behind the BlockDriverState abstraction

2012-06-13 Thread Markus Armbruster
Peter Maydell writes: > On 7 June 2012 09:13, Markus Armbruster wrote: >> Peter Maydell writes: >>> I think it matters in the general case, yours is just the first >>> usage of this API which has caught my attention. We should fix >>> the API before adding more uses of it (at the moment it seem

Re: [Qemu-devel] [PATCH 2/2] xen: Don't peek behind the BlockDriverState abstraction

2012-06-07 Thread Peter Maydell
On 7 June 2012 09:13, Markus Armbruster wrote: > Peter Maydell writes: >> I think it matters in the general case, yours is just the first >> usage of this API which has caught my attention. We should fix >> the API before adding more uses of it (at the moment it seems to >> be only used in two pl

Re: [Qemu-devel] [PATCH 2/2] xen: Don't peek behind the BlockDriverState abstraction

2012-06-07 Thread Markus Armbruster
Peter Maydell writes: > On 6 June 2012 13:55, Markus Armbruster wrote: >> Peter Maydell writes: >> >>> On 5 June 2012 13:51, Markus Armbruster wrote: @@ -554,6 +553,7 @@ static int blk_init(struct XenDevice *xendev)  {     struct XenBlkDev *blkdev = container_of(xendev, struct X

Re: [Qemu-devel] [PATCH 2/2] xen: Don't peek behind the BlockDriverState abstraction

2012-06-06 Thread Peter Maydell
On 6 June 2012 13:55, Markus Armbruster wrote: > Peter Maydell writes: > >> On 5 June 2012 13:51, Markus Armbruster wrote: >>> @@ -554,6 +553,7 @@ static int blk_init(struct XenDevice *xendev) >>>  { >>>     struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, >>> xendev); >>>    

Re: [Qemu-devel] [PATCH 2/2] xen: Don't peek behind the BlockDriverState abstraction

2012-06-06 Thread Markus Armbruster
Peter Maydell writes: > On 5 June 2012 13:51, Markus Armbruster wrote: >> @@ -554,6 +553,7 @@ static int blk_init(struct XenDevice *xendev) >>  { >>     struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, >> xendev); >>     int index, qflags, info = 0; >> +    char fmt_name[128];

Re: [Qemu-devel] [PATCH 2/2] xen: Don't peek behind the BlockDriverState abstraction

2012-06-06 Thread Stefano Stabellini
On Wed, 6 Jun 2012, Markus Armbruster wrote: > Stefano Stabellini writes: > > On Tue, 5 Jun 2012, Markus Armbruster wrote: > >> First offender is xen_config_dev_blk()'s use of disk->bdrv->filename. > >> Get the filename from disk->opts instead. Same result, except for > >> snapshots: there, we no

Re: [Qemu-devel] [PATCH 2/2] xen: Don't peek behind the BlockDriverState abstraction

2012-06-06 Thread Peter Maydell
On 5 June 2012 13:51, Markus Armbruster wrote: > @@ -554,6 +553,7 @@ static int blk_init(struct XenDevice *xendev) >  { >     struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev); >     int index, qflags, info = 0; > +    char fmt_name[128]; Fixed length array with a hardcode

Re: [Qemu-devel] [PATCH 2/2] xen: Don't peek behind the BlockDriverState abstraction

2012-06-06 Thread Markus Armbruster
Stefano Stabellini writes: > On Tue, 5 Jun 2012, Markus Armbruster wrote: >> First offender is xen_config_dev_blk()'s use of disk->bdrv->filename. >> Get the filename from disk->opts instead. Same result, except for >> snapshots: there, we now get the filename specified by the user >> instead of

Re: [Qemu-devel] [PATCH 2/2] xen: Don't peek behind the BlockDriverState abstraction

2012-06-05 Thread Stefano Stabellini
On Tue, 5 Jun 2012, Markus Armbruster wrote: > First offender is xen_config_dev_blk()'s use of disk->bdrv->filename. > Get the filename from disk->opts instead. Same result, except for > snapshots: there, we now get the filename specified by the user > instead of the name of the temporary image cr

[Qemu-devel] [PATCH 2/2] xen: Don't peek behind the BlockDriverState abstraction

2012-06-05 Thread Markus Armbruster
First offender is xen_config_dev_blk()'s use of disk->bdrv->filename. Get the filename from disk->opts instead. Same result, except for snapshots: there, we now get the filename specified by the user instead of the name of the temporary image created by bdrv_open(). Should be an improvement. Seco