On 16.05.2016 19:57, Eric Blake wrote:
On 05/14/2016 06:45 AM, Denis V. Lunev wrote:
From: Pavel Butsykin <pbutsy...@virtuozzo.com>
There are no block drivers left that implement the old
.bdrv_write_compressed interface, so it can be removed now.
Signed-off-by: Pavel Butsykin <pbutsy...@virtuozzo.com>
Signed-off-by: Denis V. Lunev <d...@openvz.org>
CC: Jeff Cody <jc...@redhat.com>
CC: Markus Armbruster <arm...@redhat.com>
CC: Eric Blake <ebl...@redhat.com>
CC: John Snow <js...@redhat.com>
CC: Stefan Hajnoczi <stefa...@redhat.com>
CC: Kevin Wolf <kw...@redhat.com>
---
+++ b/block/io.c
@@ -1876,7 +1876,6 @@ static void bdrv_write_compressed_co_entry(void *opaque)
int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num,
const uint8_t *buf, int nb_sectors)
{
- BlockDriver *drv = bs->drv;
BdrvWriteCompressedCo data = {
.bs = bs,
.sector_num = sector_num,
@@ -1885,19 +1884,6 @@ int bdrv_write_compressed(BlockDriverState *bs, int64_t
sector_num,
.ret = -EINPROGRESS,
};
- if (!drv) {
- return -ENOMEDIUM;
- }
Why are you deleting this check?
Because this check is duplicated in bdrv_co_write_compressed(), but
in this place it was necessary for drv->bdrv_write_compressed.