Am 08.03.2013 um 12:46 hat Peter Lieven geschrieben: > > Am 08.03.2013 um 10:35 schrieb Kevin Wolf <kw...@redhat.com>: > > > Am 08.03.2013 um 10:23 hat Paolo Bonzini geschrieben: > >> Il 08/03/2013 08:53, Peter Lieven ha scritto: > >>>> > >>>> I think the fix is to only call it for the monitor command. Optionally, > >>>> when shrinking, assert that there are no requests in flight. > >>> > >>> Okay. > >>> > >>> What is the plan? just fix this or fix the whole thing (which seems to > >>> be some > >>> work). > >>> > >>> The suggested patch from Jeff will break iscsi_truncate as bs->growable > >>> is 1 currently. > >> > >> I guess it's up to Kevin and Jeff. > > > > Someone needs to send a fix for the qcow1 (and probably vmdk) > > regression, otherwise I'll have to revert the patch. > > What about Paolos suggestion to call bdrv_drain_all() from the block_resize > command and not in bdrv_truncate? It is not a the complete solution, but it > will fix the regression. However, what happens if someone resizes a qcow2 > device?
I suppose you mean qcow1? It doesn't support resizing images, but even if it did, this shouldn't be a problem: The problematic case is the call of bdrv_drain_all() during a read/write function, which would have to wait for itself to complete. As soon as you restrict the bdrv_drain_all() to the monitor, waiting for in-flight I/Os should just work. Kevin