block: change discard to co_discard
commit6db39ae2e250f15da17462444ea18a9fcef41e05
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 20 Oct 2011 11:16:25 +0000 (20 13:16 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 21 Oct 2011 15:34:14 +0000 (21 17:34 +0200)
tree5589abb302dd9261348c7e67ca9a5eb2f89a14d5
parent8b94ff85737062876c03e7506abb500521c749b9
block: change discard to co_discard

Since coroutine operation is now mandatory, convert both bdrv_discard
implementations to coroutines.  For qcow2, this means taking the lock
around the operation.  raw-posix remains synchronous.

The bdrv_discard callback is then unused and can be eliminated.

Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/qcow2.c
block/raw-posix.c
block_int.h