Re: [Qemu-devel] [PATCH 2/2] block: Handle multiwrite errors only when all requests have completed

2010-07-02 Thread Christoph Hellwig
On Thu, Jul 01, 2010 at 04:31:58PM +0200, Kevin Wolf wrote: > Don't try to be clever by freeing all temporary data and calling all callbacks > when the return value (an error) is certain. Doing so has at least two > important problems: > > * The temporary data that is freed (qiov, possibly zero bu

Re: [Qemu-devel] [PATCH 2/2] block: Handle multiwrite errors only when all requests have completed

2010-07-02 Thread Stefan Hajnoczi
On Thu, Jul 1, 2010 at 3:31 PM, Kevin Wolf wrote: > Don't try to be clever by freeing all temporary data and calling all callbacks > when the return value (an error) is certain. Doing so has at least two > important problems: > > * The temporary data that is freed (qiov, possibly zero buffer) is s

[Qemu-devel] [PATCH 2/2] block: Handle multiwrite errors only when all requests have completed

2010-07-01 Thread Kevin Wolf
Don't try to be clever by freeing all temporary data and calling all callbacks when the return value (an error) is certain. Doing so has at least two important problems: * The temporary data that is freed (qiov, possibly zero buffer) is still used by the requests that have not yet completed. * C