From patchwork Wed Nov 13 18:43:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Shinkevich X-Patchwork-Id: 11242647 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 598176C1 for ; Wed, 13 Nov 2019 18:44:18 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1F9F2206F0 for ; Wed, 13 Nov 2019 18:44:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F9F2206F0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:49964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUxcm-0004tv-Kx for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 Nov 2019 13:44:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38854) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUxbu-0003mr-6q for qemu-devel@nongnu.org; Wed, 13 Nov 2019 13:43:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iUxbt-0006Nq-2X for qemu-devel@nongnu.org; Wed, 13 Nov 2019 13:43:21 -0500 Received: from relay.sw.ru ([185.231.240.75]:44840) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iUxbs-0006Kg-Pt; Wed, 13 Nov 2019 13:43:21 -0500 Received: from dhcp-172-16-25-136.sw.ru ([172.16.25.136] helo=localhost.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.3) (envelope-from ) id 1iUxbj-000249-4x; Wed, 13 Nov 2019 21:43:11 +0300 From: Andrey Shinkevich To: qemu-devel@nongnu.org, qemu-block@nongnu.org Subject: [PATCH v7 0/3] qcow2: advanced compression options Date: Wed, 13 Nov 2019 21:43:06 +0300 Message-Id: <1573670589-229357-1-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, armbru@redhat.com, mreitz@redhat.com, andrey.shinkevich@virtuozzo.com, den@openvz.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The compression filter driver is introduced as suggested by Max. A sample usage of the filter can be found in the test #214. Now, multiple clusters can be written compressed. It is useful for the backup job. v7: 01: The 'zip_' prefix for the compression filter functions replaced with 'compress_' one. 02: .bdrv_co_preadv/pwritev (without _part) removed from the filter. 03: .bdrv_refresh_limits amended. 04: .bdrv_get_info added. 05: In qapi/block-core.json, @compress: Since 5.0 was set. Discussed in the email thread with the message ID <1573488277-794975-1-git-send-email-andrey.shinkevich@virtuozzo.com> Andrey Shinkevich (3): block: introduce compress filter driver qcow2: Allow writing compressed data of multiple clusters tests/qemu-iotests: add case to write compressed data of multiple clusters block/Makefile.objs | 1 + block/filter-compress.c | 201 +++++++++++++++++++++++++++++++++++++++++++++ block/qcow2.c | 102 +++++++++++++++++------ qapi/block-core.json | 10 ++- tests/qemu-iotests/214 | 43 ++++++++++ tests/qemu-iotests/214.out | 14 ++++ 6 files changed, 340 insertions(+), 31 deletions(-) create mode 100644 block/filter-compress.c