From patchwork Wed Dec 2 18:30:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Shinkevich X-Patchwork-Id: 11946723 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 498A8C64E7C for ; Wed, 2 Dec 2020 18:35:12 +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 B166522248 for ; Wed, 2 Dec 2020 18:35:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B166522248 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=nongnu.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:51938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkWy6-0006r7-LM for qemu-devel@archiver.kernel.org; Wed, 02 Dec 2020 13:35:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkWuI-0001do-MT; Wed, 02 Dec 2020 13:31:14 -0500 Received: from relay.sw.ru ([185.231.240.75]:49922 helo=relay3.sw.ru) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkWuB-000104-5a; Wed, 02 Dec 2020 13:31:14 -0500 Received: from [172.16.25.136] (helo=localhost.sw.ru) by relay3.sw.ru with esmtp (Exim 4.94) (envelope-from ) id 1kkWtu-00BTPZ-6O; Wed, 02 Dec 2020 21:30:50 +0300 To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, kwolf@redhat.com, mreitz@redhat.com, stefanha@redhat.com, fam@euphon.net, armbru@redhat.com, jsnow@redhat.com, eblake@redhat.com, den@openvz.org, vsementsov@virtuozzo.com, andrey.shinkevich@virtuozzo.com Subject: [PATCH v13 00/10] Apply COR-filter to the block-stream permanently Date: Wed, 2 Dec 2020 21:30:51 +0300 Message-Id: <1606933861-297777-1-git-send-email-andrey.shinkevich@virtuozzo.com> X-Mailer: git-send-email 1.8.3.1 Received-SPF: pass client-ip=185.231.240.75; envelope-from=andrey.shinkevich@virtuozzo.com; helo=relay3.sw.ru X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: Andrey Shinkevich X-Patchwork-Original-From: Andrey Shinkevich via From: Andrey Shinkevich The previous version 12 was discussed in the email thread: Message-Id: <1603390423-980205-1-git-send-email-andrey.shinkevich@virtuozzo.com> v13: 02: The bdrv_remove_node() was dropped. 05: Three patches with fixes were merged into one. 06: Minor changes based on Vladimir's suggestions. 08: Three patches with fixes were merged into one. 09: The search for format_name of backing file was added. 10: The flag BLK_PERM_GRAPH_MOD was removed. Andrey Shinkevich (10): copy-on-read: support preadv/pwritev_part functions block: add API function to insert a node copy-on-read: add filter drop function qapi: add filter-node-name to block-stream qapi: create BlockdevOptionsCor structure for COR driver iotests: add #310 to test bottom node in COR driver block: include supported_read_flags into BDS structure copy-on-read: skip non-guest reads if no copy needed stream: skip filters when writing backing file name to QCOW2 header block: apply COR-filter to block-stream jobs block.c | 25 +++++++ block/copy-on-read.c | 143 +++++++++++++++++++++++++++++++++++++---- block/copy-on-read.h | 32 +++++++++ block/io.c | 12 +++- block/monitor/block-hmp-cmds.c | 4 +- block/stream.c | 120 +++++++++++++++++++++++----------- blockdev.c | 12 ++-- include/block/block.h | 10 ++- include/block/block_int.h | 11 +++- qapi/block-core.json | 27 +++++++- tests/qemu-iotests/030 | 51 ++------------- tests/qemu-iotests/030.out | 4 +- tests/qemu-iotests/141.out | 2 +- tests/qemu-iotests/245 | 22 +++++-- tests/qemu-iotests/310 | 114 ++++++++++++++++++++++++++++++++ tests/qemu-iotests/310.out | 15 +++++ tests/qemu-iotests/group | 1 + 17 files changed, 484 insertions(+), 121 deletions(-) create mode 100644 block/copy-on-read.h create mode 100755 tests/qemu-iotests/310 create mode 100644 tests/qemu-iotests/310.out