Re: [Qemu-devel] [PATCH] blk: fix aio context loss on media change

2017-03-15 Thread Kevin Wolf
Am 15.03.2017 um 16:09 hat Paolo Bonzini geschrieben: > There should be a policy on which BB sets AioContext on the BDS (e.g. > only the device does it), but apart from that, it should not be an issue. > >>> > >>> We don't know which BBs are going to be attached. We don't necessarily > >>

Re: [Qemu-devel] [PATCH] blk: fix aio context loss on media change

2017-03-15 Thread Paolo Bonzini
On 15/03/2017 16:02, Kevin Wolf wrote: > Am 15.03.2017 um 15:43 hat Paolo Bonzini geschrieben: >> On 15/03/2017 15:30, Kevin Wolf wrote: >>> Am 15.03.2017 um 14:39 hat Paolo Bonzini geschrieben: On 15/03/2017 12:03, Kevin Wolf wrote: > But we discussed this earlier, and while I'm not com

Re: [Qemu-devel] [PATCH] blk: fix aio context loss on media change

2017-03-15 Thread Kevin Wolf
Am 15.03.2017 um 15:43 hat Paolo Bonzini geschrieben: > On 15/03/2017 15:30, Kevin Wolf wrote: > > Am 15.03.2017 um 14:39 hat Paolo Bonzini geschrieben: > >> On 15/03/2017 12:03, Kevin Wolf wrote: > >>> But we discussed this earlier, and while I'm not completely sure any > >>> more about the detail

Re: [Qemu-devel] [PATCH] blk: fix aio context loss on media change

2017-03-15 Thread Paolo Bonzini
On 15/03/2017 15:30, Kevin Wolf wrote: > Am 15.03.2017 um 14:39 hat Paolo Bonzini geschrieben: >> On 15/03/2017 12:03, Kevin Wolf wrote: >>> But we discussed this earlier, and while I'm not completely sure any >>> more about the details, I seem to remeber that Paolo said something >>> along the l

Re: [Qemu-devel] [PATCH] blk: fix aio context loss on media change

2017-03-15 Thread Fam Zheng
On Wed, 03/15 17:04, Vladimir Sementsov-Ogievskiy wrote: > 15.03.2017 16:13, Fam Zheng wrote: > > On Wed, 03/15 13:06, Kevin Wolf wrote: > > > > > Stefan, Paolo, do you remember the details why we didn't even do a > > > > > simple fix like the one below? I think there were some patches on the > > >

Re: [Qemu-devel] [PATCH] blk: fix aio context loss on media change

2017-03-15 Thread Kevin Wolf
Am 15.03.2017 um 14:39 hat Paolo Bonzini geschrieben: > On 15/03/2017 12:03, Kevin Wolf wrote: > > But we discussed this earlier, and while I'm not completely sure any > > more about the details, I seem to remeber that Paolo said something > > along the lines that AioContext is going away anyway an

Re: [Qemu-devel] [PATCH] blk: fix aio context loss on media change

2017-03-15 Thread Vladimir Sementsov-Ogievskiy
15.03.2017 16:13, Fam Zheng wrote: On Wed, 03/15 13:06, Kevin Wolf wrote: Stefan, Paolo, do you remember the details why we didn't even do a simple fix like the one below? I think there were some patches on the list, no? ISTM the concern was mostly "what about other BB in the graph?" Should th

Re: [Qemu-devel] [PATCH] blk: fix aio context loss on media change

2017-03-15 Thread Paolo Bonzini
On 15/03/2017 12:03, Kevin Wolf wrote: > But we discussed this earlier, and while I'm not completely sure any > more about the details, I seem to remeber that Paolo said something > along the lines that AioContext is going away anyway and building the > code for proper management would be wasted

Re: [Qemu-devel] [PATCH] blk: fix aio context loss on media change

2017-03-15 Thread Fam Zheng
On Wed, 03/15 13:06, Kevin Wolf wrote: > > > > > > Stefan, Paolo, do you remember the details why we didn't even do a > > > simple fix like the one below? I think there were some patches on the > > > list, no? > > > > ISTM the concern was mostly "what about other BB in the graph?" > > > > Should

Re: [Qemu-devel] [PATCH] blk: fix aio context loss on media change

2017-03-15 Thread Kevin Wolf
Am 15.03.2017 um 12:14 hat Fam Zheng geschrieben: > On Wed, 03/15 12:03, Kevin Wolf wrote: > > Am 14.03.2017 um 18:11 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > If we have separate iothread for cdrom, we lose connection to it on > > > qmp_blockdev_change_medium, as aio_context is on bds wh

Re: [Qemu-devel] [PATCH] blk: fix aio context loss on media change

2017-03-15 Thread Fam Zheng
On Wed, 03/15 12:03, Kevin Wolf wrote: > Am 14.03.2017 um 18:11 hat Vladimir Sementsov-Ogievskiy geschrieben: > > If we have separate iothread for cdrom, we lose connection to it on > > qmp_blockdev_change_medium, as aio_context is on bds which is dropped > > and switched with new one. > > > > As

Re: [Qemu-devel] [PATCH] blk: fix aio context loss on media change

2017-03-15 Thread Kevin Wolf
Am 14.03.2017 um 18:11 hat Vladimir Sementsov-Ogievskiy geschrieben: > If we have separate iothread for cdrom, we lose connection to it on > qmp_blockdev_change_medium, as aio_context is on bds which is dropped > and switched with new one. > > As an example result, after such media change we have

[Qemu-devel] [PATCH] blk: fix aio context loss on media change

2017-03-14 Thread Vladimir Sementsov-Ogievskiy
If we have separate iothread for cdrom, we lose connection to it on qmp_blockdev_change_medium, as aio_context is on bds which is dropped and switched with new one. As an example result, after such media change we have crash on virtio_scsi_ctx_check: Assertion `blk_get_aio_context(d->conf.blk) ==