From 205ef7961f781496366e0a93a4ec621ad3724bd7 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 21 Oct 2010 16:43:43 +0200 Subject: block: Allow bdrv_flush to return errors This changes bdrv_flush to return 0 on success and -errno in case of failure. It's a requirement for implementing proper error handle in users of bdrv_flush. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qcow2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'block/qcow2.c') diff --git a/block/qcow2.c b/block/qcow2.c index b816d87..537c479 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1148,9 +1148,9 @@ static int qcow_write_compressed(BlockDriverState *bs, int64_t sector_num, return 0; } -static void qcow_flush(BlockDriverState *bs) +static int qcow_flush(BlockDriverState *bs) { - bdrv_flush(bs->file); + return bdrv_flush(bs->file); } static BlockDriverAIOCB *qcow_aio_flush(BlockDriverState *bs, -- cgit v1.1