Re: [Qemu-devel] [PULL v2 10/40] blockdev: Implement change with basic operations

2016-01-11 Thread Markus Armbruster
Peter Maydell writes: > On 7 January 2016 at 22:43, Max Reitz wrote: >> I hope that the above explanation helped you understand why it bled into >> tray-less devices, from a technical perspective. > > Yes, thanks, that was definitely a helpful explanation for why > the design is the way it is. I

Re: [Qemu-devel] [PULL v2 10/40] blockdev: Implement change with basic operations

2016-01-08 Thread Peter Maydell
On 7 January 2016 at 22:43, Max Reitz wrote: > I hope that the above explanation helped you understand why it bled into > tray-less devices, from a technical perspective. Yes, thanks, that was definitely a helpful explanation for why the design is the way it is. I'm still not sure how useful it i

Re: [Qemu-devel] [PULL v2 10/40] blockdev: Implement change with basic operations

2016-01-07 Thread Max Reitz
On 07.01.2016 23:19, Peter Maydell wrote: > On 7 January 2016 at 21:57, Max Reitz wrote: >> On 07.01.2016 22:42, Peter Maydell wrote: >>> Well, previously sd.c didn't need to have any state for this >>> to all work right (or indeed care about implementing a fake >>> tray status for a device that d

Re: [Qemu-devel] [PULL v2 10/40] blockdev: Implement change with basic operations

2016-01-07 Thread Peter Maydell
On 7 January 2016 at 21:57, Max Reitz wrote: > On 07.01.2016 22:42, Peter Maydell wrote: >> Well, previously sd.c didn't need to have any state for this >> to all work right (or indeed care about implementing a fake >> tray status for a device that doesn't have a tray), so it seems >> odd that we

Re: [Qemu-devel] [PULL v2 10/40] blockdev: Implement change with basic operations

2016-01-07 Thread Max Reitz
On 07.01.2016 22:42, Peter Maydell wrote: > On 7 January 2016 at 20:14, Max Reitz wrote: >> On 07.01.2016 20:56, Peter Maydell wrote: >>> It looks like sd.c is the only one which implements a change_media_cb >>> but no is_tray_open, but it would be nice if we could implement this >>> in the defaul

Re: [Qemu-devel] [PULL v2 10/40] blockdev: Implement change with basic operations

2016-01-07 Thread Peter Maydell
On 7 January 2016 at 20:14, Max Reitz wrote: > On 07.01.2016 20:56, Peter Maydell wrote: >> It looks like sd.c is the only one which implements a change_media_cb >> but no is_tray_open, but it would be nice if we could implement this >> in the default blk_dev_is_tray_open() method rather than in t

Re: [Qemu-devel] [PULL v2 10/40] blockdev: Implement change with basic operations

2016-01-07 Thread Peter Maydell
On 10 November 2015 at 14:09, Kevin Wolf wrote: > From: Max Reitz > > Implement 'change' on block devices by calling blockdev-open-tray, > blockdev-remove-medium, blockdev-insert-medium (a variation of that > which does not need a node-name) and blockdev-close-tray. > > Signed-off-by: Max Reitz

[Qemu-devel] [PULL v2 10/40] blockdev: Implement change with basic operations

2015-11-10 Thread Kevin Wolf
From: Max Reitz Implement 'change' on block devices by calling blockdev-open-tray, blockdev-remove-medium, blockdev-insert-medium (a variation of that which does not need a node-name) and blockdev-close-tray. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- blockdev.c | 178