From patchwork Thu May 23 15:44:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Eiderman X-Patchwork-Id: 10958127 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 964EB112C for ; Thu, 23 May 2019 15:46:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82899286A7 for ; Thu, 23 May 2019 15:46:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 76BDC286AA; Thu, 23 May 2019 15:46:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 220E9286AE for ; Thu, 23 May 2019 15:46:28 +0000 (UTC) Received: from localhost ([127.0.0.1]:39236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTpvH-0001jp-DI for patchwork-qemu-devel@patchwork.kernel.org; Thu, 23 May 2019 11:46:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTptt-0007tE-WD for qemu-devel@nongnu.org; Thu, 23 May 2019 11:45:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTptt-0006GR-5b for qemu-devel@nongnu.org; Thu, 23 May 2019 11:45:01 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:52806) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hTptq-0006Dv-LD; Thu, 23 May 2019 11:44:58 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x4NFi2OP089962; Thu, 23 May 2019 15:44:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2018-07-02; bh=tyZ3LhKY8iRKA8W74EREedCsODfrUq9FQ7W9Q33AHnc=; b=TBeq9bAqfXFJi8qoTJQKGOxFpDW9/SW4fJxbAeRfM8OHgM0rWP7qoBM6HkZNEofasNQ+ OuQ8/13d3YdLAPZBdBjRB1OpOPMnU49jsAnKhgAOmB2xeyl1uzf43lhsHPWIvI4SdAcS eO77PsRhcIX5+aR9TUIpdT5BP+ZXyrLNmBCH8Ft7pqGck9c9tDih3XGZN7lrVgj88jpi yPmFIYkfPaJvWeOyOcI80jKl6/bW0lYaZ9qKIZfR5OnsUEWjh/YbhfYikFHAT4N88Kru VsFKmqhlxrodihuYSrEHPRAHX9Ts8BoFtRZBX8csLlBsyBoOuBrz+ryZpQQi+ucC9qt0 RQ== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2130.oracle.com with ESMTP id 2smsk5k9nn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 May 2019 15:44:56 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x4NFhenX022071; Thu, 23 May 2019 15:44:56 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 2smsgtat2h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 May 2019 15:44:56 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x4NFisUE024461; Thu, 23 May 2019 15:44:55 GMT Received: from nexus.ravello.local (/213.57.127.2) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 23 May 2019 15:44:54 +0000 From: Sam Eiderman To: kwolf@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org, mreitz@redhat.com Date: Thu, 23 May 2019 18:44:41 +0300 Message-Id: <20190523154444.28783-1-shmuel.eiderman@oracle.com> X-Mailer: git-send-email 2.13.3 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9265 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=257 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905230107 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9265 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=298 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905230107 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 141.146.126.79 Subject: [Qemu-devel] [PATCH v4 0/3] qemu-img: rebase: Improve/optimize rebase operation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: eyal.moscovici@oracle.com, arbel.moshe@oracle.com, liran.alon@oracle.com, shmuel.eiderman@oracle.com, sagi.amit@oracle.com, karl.heubaum@oracle.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch series aims to improve the speed of qemu-img rebase. 1. Mainly by removing unnecessary reads when rebasing on the same chain. 2. But also by minimizing the number of bdrv_open calls rebase requires. v2: * Added missing g_free in "qemu-img: rebase: Reuse in-chain BlockDriverState" v3: * Rebased on top of "Allow rebase with no input base" series v4: * Using backing_bs(bs) when a prefix was detected since bs was already checked for allocation. Sam Eiderman (3): qemu-img: rebase: Reuse parent BlockDriverState qemu-img: rebase: Reduce reads on in-chain rebase qemu-img: rebase: Reuse in-chain BlockDriverState qemu-img.c | 85 ++++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 55 insertions(+), 30 deletions(-)