From patchwork Thu May 2 13:58:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Eiderman X-Patchwork-Id: 10926879 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 6C22113AD for ; Thu, 2 May 2019 14:00:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AF7B201BD for ; Thu, 2 May 2019 14:00:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4ED7C20223; Thu, 2 May 2019 14:00:46 +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 04878201BD for ; Thu, 2 May 2019 14:00:45 +0000 (UTC) Received: from localhost ([127.0.0.1]:51566 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMCGS-0003JJ-Nb for patchwork-qemu-devel@patchwork.kernel.org; Thu, 02 May 2019 10:00:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMCF7-0002Ga-9W for qemu-devel@nongnu.org; Thu, 02 May 2019 09:59:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMCF6-0008M6-9N for qemu-devel@nongnu.org; Thu, 02 May 2019 09:59:21 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:57212) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMCF0-0008EU-Tp; Thu, 02 May 2019 09:59:15 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x42DrkVS035771; Thu, 2 May 2019 13:59:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2018-07-02; bh=W+DgkX3WpUWxz9RRS5xSoAyHrSdF9ITlRqjQjs6QkCE=; b=aok5cT4b36VJMWiKhXNgVKBhrw8Ug0AVD/rO6EpLBUBmZQvQfIXCpJrB6k0s1y/GsWHp jpMrF1/hd0PiObut155sQPDVy3XJC3J3S8aCF25hS+jVM0EcG3ShlzkUXikJUaeQvWVX /j3s3RniZJf9QxiD7EUDpMo+hZRC6uErbrEejR7TPnZB2SPzZjLpVHnFBrEdZ0RadGBy Hpoi5BCS64Ub8ZhrmScirK/SS73Dtteml4GgC7KfxAmAq26zM7gUiuxR4o5Wh5gQV7UB jSQuvLN2K/Aw7fGSeyLlVjt+AtTapfX0Wxvjvt72nd1AIeJclagldawQOxgSHB8Rh/ad xA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 2s6xhygtme-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 May 2019 13:59:06 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x42Dx5JM147652; Thu, 2 May 2019 13:59:05 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 2s6xhgtnf7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 02 May 2019 13:59:05 +0000 Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x42Dx2cU030308; Thu, 2 May 2019 13:59:04 GMT Received: from nexus.ravello.local (/213.57.127.2) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 02 May 2019 06:59:02 -0700 From: Sam Eiderman To: kwolf@redhat.com, mreitz@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org Date: Thu, 2 May 2019 16:58:25 +0300 Message-Id: <20190502135828.42797-1-shmuel.eiderman@oracle.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20190502085029.30776-1-shmuel.eiderman@oracle.com> References: <20190502085029.30776-1-shmuel.eiderman@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9244 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=260 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905020095 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9244 signatures=668685 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=293 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905020095 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 156.151.31.86 Subject: [Qemu-devel] [PATCH v2 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"* 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, 58 insertions(+), 27 deletions(-)