[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 05/10] block: remove BlockDriver.bdrv_write_comp

From: Pavel Butsykin
Subject: Re: [Qemu-devel] [PATCH 05/10] block: remove BlockDriver.bdrv_write_compressed
Date: Tue, 17 May 2016 15:22:34 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 16.05.2016 19:57, Eric Blake wrote:
On 05/14/2016 06:45 AM, Denis V. Lunev wrote:
From: Pavel Butsykin <address@hidden>

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 <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
CC: Jeff Cody <address@hidden>
CC: Markus Armbruster <address@hidden>
CC: Eric Blake <address@hidden>
CC: John Snow <address@hidden>
CC: Stefan Hajnoczi <address@hidden>
CC: Kevin Wolf <address@hidden>

+++ 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 
          .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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]