diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-10-20 13:16:25 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-10-21 17:34:14 +0200 |
commit | 6db39ae2e250f15da17462444ea18a9fcef41e05 (patch) | |
tree | 5589abb302dd9261348c7e67ca9a5eb2f89a14d5 /block_int.h | |
parent | 8b94ff85737062876c03e7506abb500521c749b9 (diff) |
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>
Diffstat (limited to 'block_int.h')
-rw-r--r-- | block_int.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/block_int.h b/block_int.h index bc3b07e2f8..dac00f504f 100644 --- a/block_int.h +++ b/block_int.h @@ -62,8 +62,6 @@ struct BlockDriver { const uint8_t *buf, int nb_sectors); void (*bdrv_close)(BlockDriverState *bs); int (*bdrv_create)(const char *filename, QEMUOptionParameter *options); - int (*bdrv_discard)(BlockDriverState *bs, int64_t sector_num, - int nb_sectors); int (*bdrv_is_allocated)(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum); int (*bdrv_set_key)(BlockDriverState *bs, const char *key); |