qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 06/14] iotest 302: use img_info_log() helper


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH 06/14] iotest 302: use img_info_log() helper
Date: Mon, 5 Jul 2021 14:02:14 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

05.07.2021 12:15, Vladimir Sementsov-Ogievskiy wrote:
Instead of qemu_img_log("info", ..) use generic helper img_info_log().

img_info_log() has smarter logic. For example it use filter_img_info()
to filter output, which in turns filter a compression type. So it will
help us in future when we implement a possibility to use zstd
compression by default (with help of some runtime config file or maybe
build option). For now to test you should recompile qemu with a small
patch:

     --- a/block/qcow2.c
     +++ b/block/qcow2.c
     @@ -3540,6 +3540,11 @@ qcow2_co_create(BlockdevCreateOptions 
*create_options, Error **errp)
              }
          }

     +    if (!qcow2_opts->has_compression_type && version >= 3) {
     +        qcow2_opts->has_compression_type = true;
     +        qcow2_opts->compression_type = QCOW2_COMPRESSION_TYPE_ZSTD;
     +    }
     +
          if (qcow2_opts->has_compression_type &&
              qcow2_opts->compression_type != QCOW2_COMPRESSION_TYPE_ZLIB) {

Signed-off-by: Vladimir Sementsov-Ogievskiy<vsementsov@virtuozzo.com>

Wow, that was bad idea to insert patch into commit message even with indent: it 
breaks rpm build for me.

So, reword like this:

    build option). For now to test you should recompile qemu with a small
    addition into block/qcow2.c before
      "if (qcow2_opts->has_compression_type":
if (!qcow2_opts->has_compression_type && version >= 3) {
            qcow2_opts->has_compression_type = true;
            qcow2_opts->compression_type = QCOW2_COMPRESSION_TYPE_ZSTD;
        }


--
Best regards,
Vladimir



reply via email to

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