From e18a58b4e3aa355a9b6eef1f39a980a4f18f1294 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 24 Apr 2018 17:01:57 -0500 Subject: block: Merge .bdrv_co_writev{,_flags} in drivers We have too many driver callback interfaces; simplify the mess somewhat by merging the flags parameter of .bdrv_co_writev_flags() into .bdrv_co_writev(). Note that as long as a driver doesn't set .supported_write_flags, the flags argument will be 0 and behavior is identical. Also note that the public function bdrv_co_writev() still lacks a flags argument; so the driver signature is thus intentionally slightly different. But that's not the end of the world, nor the first time that the driver interface differs slightly from the public interface. Ideally, we should be rewriting all of these drivers to use modern byte-based interfaces. But that's a more invasive patch to write and audit, compared to the simplification done here. Signed-off-by: Eric Blake Reviewed-by: Daniel P. Berrangé Signed-off-by: Kevin Wolf --- block/qed.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'block/qed.c') diff --git a/block/qed.c b/block/qed.c index 1db8eaf241..65cfe92393 100644 --- a/block/qed.c +++ b/block/qed.c @@ -1437,8 +1437,9 @@ static int coroutine_fn bdrv_qed_co_readv(BlockDriverState *bs, static int coroutine_fn bdrv_qed_co_writev(BlockDriverState *bs, int64_t sector_num, int nb_sectors, - QEMUIOVector *qiov) + QEMUIOVector *qiov, int flags) { + assert(!flags); return qed_co_request(bs, sector_num, qiov, nb_sectors, QED_AIOCB_WRITE); } -- cgit v1.2.3-55-g7522