From 8b57eaf433ed8ca325fb092ae2e06211e2dd7a12 Mon Sep 17 00:00:00 2001 Message-Id: <8b57eaf433ed8ca325fb092ae2e06211e2dd7a12.1429902956.git.jen@redhat.com> In-Reply-To: <67968bc615637394c3ef7dfefa360dab90f33d5d.1429902956.git.jen@redhat.com> References: <67968bc615637394c3ef7dfefa360dab90f33d5d.1429902956.git.jen@redhat.com> From: Kevin Wolf Date: Thu, 2 Apr 2015 09:28:09 -0500 Subject: [CHANGE 40/42] block: remove QED .bdrv_make_empty implementation To: rhvirt-patches@redhat.com, jen@redhat.com RH-Author: Kevin Wolf Message-id: <1427966891-29967-2-git-send-email-kwolf@redhat.com> Patchwork-id: 64676 O-Subject: [RHEL-6.7 qemu-kvm PATCH 1/3] block: remove QED .bdrv_make_empty implementation Bugzilla: 1130022 RH-Acked-by: Jeffrey Cody RH-Acked-by: Stefan Hajnoczi RH-Acked-by: John Snow From: Jeff Cody The QED .bdrv_make_empty() implementation does nothing but return -ENOTSUP, which causes problems in bdrv_commit(). Since the function stub exists for QED, it is called, which then always returns an error. The proper way to not support an optional driver function stub is to just not implement it, so let's remove the stub. Signed-off-by: Jeff Cody Reviewed-by: Benoit Canet Signed-off-by: Stefan Hajnoczi (cherry picked from commit 55aff7f133b0eb20b2c8a2a3e1307240aab8044c) Signed-off-by: Kevin Wolf --- block/qed.c | 6 ------ 1 file changed, 6 deletions(-) Signed-off-by: Jeff E. Nelson --- block/qed.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/block/qed.c b/block/qed.c index 474aee4..53caff4 100644 --- a/block/qed.c +++ b/block/qed.c @@ -723,11 +723,6 @@ static int64_t coroutine_fn bdrv_qed_co_get_block_status(BlockDriverState *bs, return cb.status; } -static int bdrv_qed_make_empty(BlockDriverState *bs) -{ - return -ENOTSUP; -} - static BDRVQEDState *acb_to_s(QEDAIOCB *acb) { return acb->common.bs->opaque; @@ -1607,7 +1602,6 @@ static BlockDriver bdrv_qed = { .bdrv_reopen_prepare = bdrv_qed_reopen_prepare, .bdrv_create = bdrv_qed_create, .bdrv_co_get_block_status = bdrv_qed_co_get_block_status, - .bdrv_make_empty = bdrv_qed_make_empty, .bdrv_aio_readv = bdrv_qed_aio_readv, .bdrv_aio_writev = bdrv_qed_aio_writev, .bdrv_aio_flush = bdrv_qed_aio_flush, -- 2.1.0