diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2011-10-17 12:32:13 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-10-21 17:34:13 +0200 |
commit | 6f6dc6565e2b65ec8c0cf47622b4f5f1468d194e (patch) | |
tree | 9c15371a4bea7698a2f29ff1e6266612c789a427 /block/qcow2.c | |
parent | 07f076157475e1a8ea454e304e0ea5496d05b539 (diff) |
block: drop redundant bdrv_flush implementation
Block drivers now only need to provide either of .bdrv_co_flush,
.bdrv_aio_flush() or for legacy drivers .bdrv_flush(). Remove
the redundant .bdrv_flush() implementations.
[Paolo Bonzini: change raw driver to bdrv_co_flush]
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2.c')
-rw-r--r-- | block/qcow2.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index 510ff6897f..4dc980c2c5 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1092,24 +1092,6 @@ static int qcow2_write_compressed(BlockDriverState *bs, int64_t sector_num, return 0; } -static int qcow2_flush(BlockDriverState *bs) -{ - BDRVQcowState *s = bs->opaque; - int ret; - - ret = qcow2_cache_flush(bs, s->l2_table_cache); - if (ret < 0) { - return ret; - } - - ret = qcow2_cache_flush(bs, s->refcount_block_cache); - if (ret < 0) { - return ret; - } - - return bdrv_flush(bs->file); -} - static BlockDriverAIOCB *qcow2_aio_flush(BlockDriverState *bs, BlockDriverCompletionFunc *cb, void *opaque) @@ -1242,7 +1224,6 @@ static BlockDriver bdrv_qcow2 = { .bdrv_open = qcow2_open, .bdrv_close = qcow2_close, .bdrv_create = qcow2_create, - .bdrv_flush = qcow2_flush, .bdrv_is_allocated = qcow2_is_allocated, .bdrv_set_key = qcow2_set_key, .bdrv_make_empty = qcow2_make_empty, |