From nobody Tue Nov 18 22:49:05 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass(p=quarantine dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1614163757; cv=pass; d=zohomail.com; s=zohoarc; b=g9JcIVhUbprGqc7PcJJAHsG0GQEiY1QPa1f4g3Dlp/cL84pptGWV6o1777a7fEDATLfZuz6EI0LBbqIKZJPTdjgGRGNWcx2ZCNLQmSnBBF7lYCxDx/+fU5D+sN1CALbQgOK0RjlOgsCnihWIRR8foBaiZcsXl7kDjhu4p7K9vME= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614163757; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oWatco1vbjpU95+hxsFVUdG10wWNRJZJS4e+gmnf9bs=; b=bk2EYBxt0WpwighXYJe/GwTm9AE5wu0U/LJMmdXZ3QiuM9thkJOyEXjXcugMXCWuEfOV2ETkKZf/SrqDwaTxz3FRfzYqjh+gdYe+LQ1y3homAGk9O318xA5UylIt7Rqe/Meb4f04gtkL3pmEUG7grsRSH89RhNip5jYeTtFyrsI= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass header.from= (p=quarantine dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1614163756854697.205204305406; Wed, 24 Feb 2021 02:49:16 -0800 (PST) Received: from localhost ([::1]:50142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lErjH-0008M3-Ci for importer@patchew.org; Wed, 24 Feb 2021 05:49:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lErhd-0006eg-WD; Wed, 24 Feb 2021 05:47:34 -0500 Received: from mail-eopbgr80124.outbound.protection.outlook.com ([40.107.8.124]:36517 helo=EUR04-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lErha-0007Jd-Eh; Wed, 24 Feb 2021 05:47:33 -0500 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB4951.eurprd08.prod.outlook.com (2603:10a6:20b:eb::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Wed, 24 Feb 2021 10:47:25 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::f1f0:6610:11f5:5e4a]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::f1f0:6610:11f5:5e4a%9]) with mapi id 15.20.3868.032; Wed, 24 Feb 2021 10:47:25 +0000 Received: from localhost.localdomain (185.215.60.244) by HE1PR05CA0177.eurprd05.prod.outlook.com (2603:10a6:3:f8::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Wed, 24 Feb 2021 10:47:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cd8NnINd/nhkwojKGePgZI7qmw/gzl+Fojf+L4xjf8kkYf9N2YtjJD4JssamGZPPBN5IS6Lp9Wa8yrwBIWiVOmvdhYLdJsc+Xb8BESxS9BQTkxgQk0tpVdc9R6D0zs+EQQSk4iSA/uA1MMBjkHeLF3yOSvSq89F/vTbB8cJZkrGqiPeYFwg8ZRbu7oKFZLFs5sihReA1wpLtOOHLpJi4E/o33JafiYZJa0KGq3IiKVXlQc3btUjnVwQYYO7sJEusI8PvijRyZSejypjTqgOy741BzPfJL83X4uVSY0RNiL/iX8o4u6Em0BdbJIkYTW7kDaG9RtBb7iyEuXUpfRjxrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oWatco1vbjpU95+hxsFVUdG10wWNRJZJS4e+gmnf9bs=; b=D4bqJfkex4X1PdVLAvXkXib23s/PPgY63xYnvqIIc8QCQss41b5OWlWp2WoQWIOajAfU+Utz2VmbjvetA+gxIj0gAVbG+XRm0EWcaqpM8HpiouOm856qs4wkDXrIznwHUse4Z9zyLnB7SnvG7GI8VXJ4IhnWQnlsntegzwOeJc6yhQYSRXM6pU4Wg10OL8/JihlwR1kd7J6GB1wkQZjaKXmw0ZJSOBtGgzgv04AoP9FXgWEUNaTWm/Ifa4F2ZUkwQGJ7URnBleotSjFPjmdXawrlmTKqXxVwkBo7NgpLFOFVtIiKnxau0hh9qJkkTovHHSNWh4Gk/TXGLeWFgcEGLA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oWatco1vbjpU95+hxsFVUdG10wWNRJZJS4e+gmnf9bs=; b=uyVjqsQyx8oa0GCAx3pyT4zKg4rK2m9tMRL1E+/ezl4HNrkjGIFsdPBSXnKg6M/niOorlkfikJlyKYrcMqYZJ1MCkedCzcoh7716KXOn8L3577qBfbVaQaj9EllmTAT9dk47WSBPDOJNZmuZ+TzodeeT8N07WHtN6ckKLh6ZtZE= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=virtuozzo.com; From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, den@openvz.org, stefanha@redhat.com, mreitz@redhat.com, kwolf@redhat.com, jsnow@redhat.com, vsementsov@virtuozzo.com, eblake@redhat.com Subject: [PATCH v2 1/6] qcow2-bitmap: make bytes_covered_by_bitmap_cluster() public Date: Wed, 24 Feb 2021 13:47:02 +0300 Message-Id: <20210224104707.88430-2-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210224104707.88430-1-vsementsov@virtuozzo.com> References: <20210224104707.88430-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [185.215.60.244] X-ClientProxiedBy: HE1PR05CA0177.eurprd05.prod.outlook.com (2603:10a6:3:f8::25) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bafd2dcc-1d5e-46ba-e4c2-08d8d8b192a3 X-MS-TrafficTypeDiagnostic: AM6PR08MB4951: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:73; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uEEsaHTcY8iwFdU2iJOxiYszIs1LND22bw1DaY1Y7Ls90dZ94nq2oxeH94UXl68Pb8aqweBgmEgBEjkur4WZxQgAw6zXjHC9IBUl/lj2KgINWy6dRXC8fFQNbIDy1cC15p7GwASTQMO6zbxHMgIXhVQrFhhcxfuVUAowFcV1d5anEDOo53M++PuWL+jHCOmpX/8TXWBUmMw2YQVzkmz9bH1yu2/zd2ib73rNzwLWlHZ3j1/C5i+4QILh7iXh2D7byMhtbj21KeJ9eOoFqdflpCDoCSm4Ihbu0i8q18MebkwyIwqcWqvrMUxr+hUxYC6v8JqH2yEsjQiHwZHC6jsZmu78/sKdcqUeBhmVKp6jI6tvi+IZmZmFhnEIQcIP2n0T9j8ZtoeOfQFKlvg5Am5NVXRRlM5YkDg0CEyb6s86dAiMDndEs1pcYh5Q1ltqUWMLvUEsoVHNAzU6FeIbk5T5sUAmNU2wyOx44FICOma+svXPntYhF05gwYCf+uXIYVon8cTf6K11hXpvGFLN3kXLs+Jr6xQRnN3iCyjMVIp64oxbqKAriloIbFOOFup+oq1d6Cx1bwAAcawlmXUR/hwtUQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(39840400004)(136003)(376002)(366004)(396003)(186003)(956004)(2616005)(36756003)(66946007)(2906002)(8936002)(6916009)(26005)(83380400001)(8676002)(16526019)(5660300002)(316002)(52116002)(6506007)(86362001)(4326008)(6512007)(478600001)(6486002)(1076003)(66556008)(69590400012)(66476007)(6666004); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?Ik5ojkU5WCjU+ulrtk5SW+bK8E6DrksGdqW6zLx4bnvHi15DVQ3f8DB+wBqS?= =?us-ascii?Q?9Jv0CFhjcX/oQg7VQUjZZsWN+r6M3ML+xab+PZdbG2vtlcjHKvHgtPhh21Hi?= =?us-ascii?Q?mBsUMMbtBGKgtTXwa0V3w11EWD/9D5jH8vdmaXANRT5a1Pdimzy8y/y+RNXa?= =?us-ascii?Q?XHTn27kPg6DYGl6o/am0fCUIZczI7mnXWCz/BT9T/Bxr4OOeB/CvDmokMRvg?= =?us-ascii?Q?/eTUC6vuiHSrYWobTObh5K1Ycqr0oDpIa0UFTVsP4Pm3bfDq313Jzwq5p3Is?= =?us-ascii?Q?gtAm0u3BeQLOJVjvlwx90OM5A+TwmpP3yPu6L0YheW5s2jU8nFYXI85nCj64?= =?us-ascii?Q?aKWuSLqIQdCl9vSqGbxH6wRHJdOzwjV/skgcZi6pAj/wnWNlI2WL1cjQeGM4?= =?us-ascii?Q?QnBRC47W13SsR95uVurMamg5hmhRlrlNKqUlg6XARGChnK5yZRbtDj8me1uS?= =?us-ascii?Q?v4grG3jo2Q4uXLlXbYkUWrom8Ik73d1GOVyv73gH8c2IsVEabOMS2pdX5i3c?= =?us-ascii?Q?b59W579+Td7gWaNxtp6rCrOHcMol3mIO5vtabC4AR5EJhsnMbTXBcB9zr0QU?= =?us-ascii?Q?GIV6TSPMuBy7QKm4kYAwBdX8TZ9NXkI7kDcv8dsC2Ug3Qi1PELvz5rMRhg11?= =?us-ascii?Q?B9+/RVqyC8QnGiew748jUIC3echamDI3NKn/Mqc5GUOnOz2jY2p56T2EybXN?= =?us-ascii?Q?gNJ18WuO68pX+ntLSQRuMtU1bGD8pTmIVUjETZ3QATXIGL1qJqMuJd0NFfVv?= =?us-ascii?Q?DqJJU19KUGK1lMnLXZWPDE1RZkJp43fPWYkVAluv0KzOI+JqQ78sI5Mxzuq+?= =?us-ascii?Q?FPGM+UGcmtI3OFDYwDD6mdQLxjuwZrico3sb0LiZHjKNFlU+SYibjKwRHshM?= =?us-ascii?Q?ttGjsGpE5CXeSKFWx6wBoKE9qrJdqv0bd/ICDZs7qu4YMUakbb7PSdbXIdQf?= =?us-ascii?Q?aL2+mArj998AZfvB34xjMXPhKHljOzX5jz04cKvWPbSFaKPT0n0bwG1NSPvH?= =?us-ascii?Q?BptO5bYDRyySFS5YUnGKBiSYbQ5Zs0QH7yIBmCyWYwWqA6NstZKRA2bJppEB?= =?us-ascii?Q?VMULYRoMXJt+P7PHhWzKsAlwGIYuZE+4vipdBpfHYNYTpWI8Zncf6Ezc9zH2?= =?us-ascii?Q?1AYip6pith17r6AcIF9tl6h+5QEWbsTw5KWXOrgB1qVj7LnsjaLLyKrmjBay?= =?us-ascii?Q?U9TpWdqiOCvMdUov5d0FNk8Ta0QlZlvq0M5qibv6F+Fn0A9uDgppecTTLdqY?= =?us-ascii?Q?3o7vpiMVszbMIc8mRn6PinlTexNzXDuxb3Py0QaTgDyUhmln8T9eo6C79HFf?= =?us-ascii?Q?G6EL1PO8j0cIqyiUzZH7ix0v?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: bafd2dcc-1d5e-46ba-e4c2-08d8d8b192a3 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2021 10:47:25.5643 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Lr6hD5EnyYpV4PgGOu1U4rBvOjrxB+WL7+E9QffNLL/1ONBMIJlUH/JZ9U47DAwGGZKUR9XKXYbjMC20ucDYN/+XOz2V29RtVcnQYhFKJLg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4951 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=40.107.8.124; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @virtuozzo.com) Content-Type: text/plain; charset="utf-8" Rename bytes_covered_by_bitmap_cluster() to bdrv_dirty_bitmap_serialization_coverage() and make it public. It is needed as we are going to share it with bitmap loading in parallels format. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: Denis V. Lunev --- include/block/dirty-bitmap.h | 2 ++ block/dirty-bitmap.c | 13 +++++++++++++ block/qcow2-bitmap.c | 16 ++-------------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/include/block/dirty-bitmap.h b/include/block/dirty-bitmap.h index 36e8da4fc2..f581cf9fd7 100644 --- a/include/block/dirty-bitmap.h +++ b/include/block/dirty-bitmap.h @@ -57,6 +57,8 @@ void bdrv_dirty_iter_free(BdrvDirtyBitmapIter *iter); uint64_t bdrv_dirty_bitmap_serialization_size(const BdrvDirtyBitmap *bitma= p, uint64_t offset, uint64_t by= tes); uint64_t bdrv_dirty_bitmap_serialization_align(const BdrvDirtyBitmap *bitm= ap); +uint64_t bdrv_dirty_bitmap_serialization_coverage(int serialized_chunk_siz= e, + const BdrvDirtyBitmap *bitmap); void bdrv_dirty_bitmap_serialize_part(const BdrvDirtyBitmap *bitmap, uint8_t *buf, uint64_t offset, uint64_t bytes); diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index 9b9cd71238..a0eaa28785 100644 --- a/block/dirty-bitmap.c +++ b/block/dirty-bitmap.c @@ -726,6 +726,19 @@ uint64_t bdrv_dirty_bitmap_serialization_align(const B= drvDirtyBitmap *bitmap) return hbitmap_serialization_align(bitmap->bitmap); } =20 +/* Return the disk size covered by a chunk of serialized bitmap data. */ +uint64_t bdrv_dirty_bitmap_serialization_coverage(int serialized_chunk_siz= e, + const BdrvDirtyBitmap *b= itmap) +{ + uint64_t granularity =3D bdrv_dirty_bitmap_granularity(bitmap); + uint64_t limit =3D granularity * (serialized_chunk_size << 3); + + assert(QEMU_IS_ALIGNED(limit, + bdrv_dirty_bitmap_serialization_align(bitmap))); + return limit; +} + + void bdrv_dirty_bitmap_serialize_part(const BdrvDirtyBitmap *bitmap, uint8_t *buf, uint64_t offset, uint64_t bytes) diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index 5eef82fa55..42d81c44cd 100644 --- a/block/qcow2-bitmap.c +++ b/block/qcow2-bitmap.c @@ -278,18 +278,6 @@ static int free_bitmap_clusters(BlockDriverState *bs, = Qcow2BitmapTable *tb) return 0; } =20 -/* Return the disk size covered by a single qcow2 cluster of bitmap data. = */ -static uint64_t bytes_covered_by_bitmap_cluster(const BDRVQcow2State *s, - const BdrvDirtyBitmap *bit= map) -{ - uint64_t granularity =3D bdrv_dirty_bitmap_granularity(bitmap); - uint64_t limit =3D granularity * (s->cluster_size << 3); - - assert(QEMU_IS_ALIGNED(limit, - bdrv_dirty_bitmap_serialization_align(bitmap))); - return limit; -} - /* load_bitmap_data * @bitmap_table entries must satisfy specification constraints. * @bitmap must be cleared */ @@ -312,7 +300,7 @@ static int load_bitmap_data(BlockDriverState *bs, } =20 buf =3D g_malloc(s->cluster_size); - limit =3D bytes_covered_by_bitmap_cluster(s, bitmap); + limit =3D bdrv_dirty_bitmap_serialization_coverage(s->cluster_size, bi= tmap); for (i =3D 0, offset =3D 0; i < tab_size; ++i, offset +=3D limit) { uint64_t count =3D MIN(bm_size - offset, limit); uint64_t entry =3D bitmap_table[i]; @@ -1303,7 +1291,7 @@ static uint64_t *store_bitmap_data(BlockDriverState *= bs, } =20 buf =3D g_malloc(s->cluster_size); - limit =3D bytes_covered_by_bitmap_cluster(s, bitmap); + limit =3D bdrv_dirty_bitmap_serialization_coverage(s->cluster_size, bi= tmap); assert(DIV_ROUND_UP(bm_size, limit) =3D=3D tb_size); =20 offset =3D 0; --=20 2.29.2 From nobody Tue Nov 18 22:49:05 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass(p=quarantine dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1614163768; cv=pass; d=zohomail.com; s=zohoarc; b=BV6FBQc4/k8RqTdnlUFIiHXlZwPbDcC6MF7QE5KmDKF04uUhIvDFNUcp/az/jgkivqpeDd9SNpNIH4styqDtXiB+VPX4XIalYkFxxnD4wzXMgsYlboHlAoMCm584lcJW6QxlbmJ+WFVrWA46LhyAgo1ijDaoLCaEIFtr/SF+jQU= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614163768; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wBWMQlv5SNOY/VXKJLa/AZ0Id3MdT5M+rdpmU/DA7Ug=; b=gZs8sYOizsZh9oRZZeeTrVZwjkcq/iGzeZ1yTE+TtO8EXbID8Tf1KMPx7hbR/55Eqixqn8iEYgk17yCJ7qwgXUgOFrJ8aUCkZQNTilhb+L5fwXuybkEeyWo9z1h5OAsTH5OuLB59m6vmGrLiJP7lUP9VeSd0JpR+0AA6e+w7MvE= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass header.from= (p=quarantine dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161416376846085.52592937221561; Wed, 24 Feb 2021 02:49:28 -0800 (PST) Received: from localhost ([::1]:51280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lErjS-0000Nr-Es for importer@patchew.org; Wed, 24 Feb 2021 05:49:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lErhe-0006fA-F2; Wed, 24 Feb 2021 05:47:34 -0500 Received: from mail-eopbgr10109.outbound.protection.outlook.com ([40.107.1.109]:50657 helo=EUR02-HE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lErhc-0007IR-OE; Wed, 24 Feb 2021 05:47:34 -0500 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB3574.eurprd08.prod.outlook.com (2603:10a6:20b:4e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.28; Wed, 24 Feb 2021 10:47:27 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::f1f0:6610:11f5:5e4a]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::f1f0:6610:11f5:5e4a%9]) with mapi id 15.20.3868.032; Wed, 24 Feb 2021 10:47:27 +0000 Received: from localhost.localdomain (185.215.60.244) by HE1PR05CA0177.eurprd05.prod.outlook.com (2603:10a6:3:f8::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Wed, 24 Feb 2021 10:47:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HPEUOhYWas+lliorU/HhmaVDxGqqwqRl0gajuVOaIKJ3ngB6wF4eTgLSiTc50AYKd2vXE3JwivWo2+psfCastCY4QwPJIJhujqj2SZXIhjw0loRZaBr4MYgVUVDHMG/Lm7Bg20FqDRQH7e9XayzFb5libPrkOXb5mkqFtBBbUC8b6hSSWC+gCzicyJWCGFbAxe21MlBd/0QcWndvLbQnqsDND4640WeF+TsSWryh0lFIrHQnM2fd0lAv70x38UYPNV/W2I52LWn3X69sMP3xqVfV66hqEv2ogf0xYV5j5W4n4RKWhcoBf4GhdamLHb2EJD7XtIt4UUNLa/yMC6jyeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wBWMQlv5SNOY/VXKJLa/AZ0Id3MdT5M+rdpmU/DA7Ug=; b=dPkAhHfMeGLuc/+vVv9ahRTZ9OFpsLpQ7dkPYTcKnA/An+5KsPcyqr2iUy587nG6BaO/001zK+tA7MysmGb0PwHtmekNxH35Rz1O1OiH2KV1TBfo+Di+6A6SUbCbDVWbULabozD16gElfLK0gOwXv+KP5dNPOnN/Vep43bR6Qw4aggQfln7NqRzA+h7cEW9DQc6jX2gWTUtv6W1NlA+C1kelPHxs8zWrb1ZNd1lV1v25EsOO04/DY9S2xKKH2aE29ka6yDmax7hAYKcbwtvMpY460xRoJuGInLxOY9aIBLC4y8vDumUE1uh8dm1su2eSyM532hUzMrvxzyy4NVZ6/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wBWMQlv5SNOY/VXKJLa/AZ0Id3MdT5M+rdpmU/DA7Ug=; b=Jpe+FKv0Ut5m8d3/WufcvqXyqnZJNuh6IqPpx5c8ev+HB5BKIK9XYJ9TMqN/UBODTdIeQdrykSXzhKdTbictWh/hi28VOmZJBo0F7QvpdP63Q7Apf+WxwsEIW9C5H2HnDIQxaI6RsDUseZMiO+O+EMMs4v0WVlo0u1PDTJx4MC8= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=virtuozzo.com; From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, den@openvz.org, stefanha@redhat.com, mreitz@redhat.com, kwolf@redhat.com, jsnow@redhat.com, vsementsov@virtuozzo.com, eblake@redhat.com Subject: [PATCH v2 2/6] parallels.txt: fix bitmap L1 table description Date: Wed, 24 Feb 2021 13:47:03 +0300 Message-Id: <20210224104707.88430-3-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210224104707.88430-1-vsementsov@virtuozzo.com> References: <20210224104707.88430-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [185.215.60.244] X-ClientProxiedBy: HE1PR05CA0177.eurprd05.prod.outlook.com (2603:10a6:3:f8::25) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 34d4402e-ef89-4afa-c013-08d8d8b19389 X-MS-TrafficTypeDiagnostic: AM6PR08MB3574: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /PskfIVL9hOqWoPVprV+mmhU1WK8JCeQ9m/scmtmtT1QeVYAc+khyah38yjrZXmOOjnbJypVHr7RBjxIFgmuhVfeZyEOuaXAGEwDNpj2nj7Ftx9Sre+Z2/+me6kTxTZxMnjCX7VbHQ1vCv6oPgVrWRXBugziQos980scgU2iCYy++3aThR+rQAfmkBMp37dH7VjXWjd8zpGkPX2SaJC12ohdVE7yyufSddOgfNtNNwxBZCrPxnpciVrNRSU/bfhRT3/L+g6eUaHD3ccYBmwtwG9Z+W0kYvWQV/Qd6zkWacp4THr9KROlHT2LjZAplKeqCsZO0zXzs0OGODUAts/PLp+a5lvq+JvvVGOA4cc4Oc/26bwCv4+4RF6VRA3/ALrqeO49OvbZ49UM88nDQtF0q3PVPPMMWfGg3KhyWdJ84ZRTqai/hf+YvVUbjn6Rys13jMVb7jmViCuAHESBkbnNi0SP882i+YFfoyC1f8KXPs0wiJHFJrZY8jvzuBJiICGGtg7RVGAaeYCHGfJ/7ZayVnW51+4kJPLT2kol9Ig60W//e9ZR/ZokKDDSolFLOpE2wDZwxDbzOc/gXOXliue4Pg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(396003)(39840400004)(346002)(366004)(136003)(4326008)(6486002)(6916009)(6512007)(186003)(2616005)(478600001)(5660300002)(52116002)(66476007)(6666004)(956004)(36756003)(66946007)(83380400001)(316002)(69590400012)(1076003)(26005)(6506007)(16526019)(8936002)(86362001)(66556008)(8676002)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?UG3swo3r0lC4d93SFOylUkDH/nn356feaxsHmR+wMXki0pv0cMuTQvzfyDi/?= =?us-ascii?Q?thVRWaY5dBvR7p8AEm6sMcfbXWcMU0hWPr7qVDE24qEk0nw5Z+q4j4wbgjm1?= =?us-ascii?Q?DlYY7oGoKzR4yumCUFj1YjTVxW+nwqD1yirC+yHRMlnRenJpaq4zTug41uQC?= =?us-ascii?Q?ZvssFTVOyCV60Cnb8Z1sejFW+zVKpmUuJA36UxXGBTkbtqHcRzKX6ODLAYL4?= =?us-ascii?Q?UpolPLYhnI30mduPcCzIbVnQGyYMhj+L0BPTaZFuCjUsC7TdxgF66l87pmcx?= =?us-ascii?Q?0hkItbLuPEicxfASwrDx+CdXg2Zd3IOBgYsUBlG+hLfMJfL0eR9gocFF/8Ma?= =?us-ascii?Q?pBBqKXNF35HOmpZclt5Z3hTXC/wVuZ6zJ1CzgvVS3+sSrMpLB+P4VNHXNBxw?= =?us-ascii?Q?WOviKyNgJOgb9VnwR3tbES1d2LXAKXptp44xqoT9tAqMtssrZdTZ5klm47Pj?= =?us-ascii?Q?pGQI4wEm8GZNM0e73+H1G66Up2aiU0WHUH4j6teu7E2ybj34U6SKvMrr8Pml?= =?us-ascii?Q?u78AcmDHPZCoRFBeZcOSj+2kUovoI4WVuhU/jztlf5s1oEY+JPBPPxBiIfCm?= =?us-ascii?Q?f1Bz5Bb5QlPL7GXD2+WidOGDB958hNb8o2dHWYJtzPhYbqCvsAJCLZFR5Ppj?= =?us-ascii?Q?LRdwxVyPWX+4sH4yY1mqWN9iOdSJc5Brpb8Zv92jnlT3ZfF1wUM7flPxGFYA?= =?us-ascii?Q?CBSj46aXS31gIalZk3Ulx75BLOVP1810KQIxlYNN1kse5Mpfc4Jl0DlFKmou?= =?us-ascii?Q?aNi5XPn7599wGLVoEEW7AECsAh/1v4dMpGj+YuBObCYPeh4JoXR2724NeJAR?= =?us-ascii?Q?deQo5cqC4esntspr2v0f8h6XVa2WTOakAB6HNA6NHoyAQSYMdzrt34lbkITN?= =?us-ascii?Q?4Wh04QYsVtfbloIHCSQPvl9lZYyjcjBiAwwgCLcyLm0OA6py6fL+og/ZDBP2?= =?us-ascii?Q?lxQdtiBQZQpbvPfG7QbDnLWRu6Xab7uh7NdDhO4pOL8tsLDGggWbpr99PP2e?= =?us-ascii?Q?Is5j4QF0m4A/9cIPq4czaVWUVM18NeSMoqVXZDV7zIAJ1FZ2WwlojLgBHl1w?= =?us-ascii?Q?2JSuBGYagfUpIsyyNHGY+iaMlwd/QgrJn2WHdXU2NSFpnlECB/3Zcd0LjJM2?= =?us-ascii?Q?GCHFcsx/01kNHRrFr6n5QgC/c0GmwcXcxX8fqsskms2hlRnvaRD1a5vS8xhL?= =?us-ascii?Q?Ah2qLIjjRcUF8rukfE79d5cpzfo5GS+KfdyfZwc0zsawPUMP6QYOgBGa98Vz?= =?us-ascii?Q?/HAb+bvkx8IypV8Gx9yFCEo6cpy8mu08HlgAbBMXzaODQeojllF72aJ8Q6FZ?= =?us-ascii?Q?EU090e84YDDXCBmWeugrz1Y3?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 34d4402e-ef89-4afa-c013-08d8d8b19389 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2021 10:47:27.1165 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OyDaHH4N0NhTwvsZoucQl9xKHxoW5WkIkEcFi91F+VEKoIiwkBmNsgnTNwFQebtW14W6kZFuRQthpgLZdWVwgMc1Nv78EoHbWxVFjbKZ54s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3574 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=40.107.1.109; envelope-from=vsementsov@virtuozzo.com; helo=EUR02-HE1-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @virtuozzo.com) Content-Type: text/plain; charset="utf-8" Actually L1 table entry offset is in 512 bytes sectors. Fix the spec. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Denis V. Lunev --- docs/interop/parallels.txt | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/docs/interop/parallels.txt b/docs/interop/parallels.txt index f15bf35bd1..73af9a2c4b 100644 --- a/docs/interop/parallels.txt +++ b/docs/interop/parallels.txt @@ -208,21 +208,24 @@ of its data area are: 28 - 31: l1_size The number of entries in the L1 table of the bitmap. =20 - variable: l1_table (8 * l1_size bytes) - L1 offset table (in bytes) + variable: L1 offset table (l1_table), size: 8 * l1_size bytes =20 -A dirty bitmap is stored using a one-level structure for the mapping to ho= st -clusters - an L1 table. +Dirty bitmap is stored in the array of clusters inside Parallels Image fil= e. +Offsets of these clusters are saved in L1 offset table here. Each L1 table +entry is a 64bit integer described below: =20 -Given an offset in bytes into the bitmap data, the offset in bytes into the -image file can be obtained as follows: +Given an offset in bytes into the bitmap data, corresponding L1 entry is =20 - offset =3D l1_table[offset / cluster_size] + (offset % cluster_size) + l1_table[offset / cluster_size] =20 -If an L1 table entry is 0, the corresponding cluster of the bitmap is assu= med -to be zero. +If L1 table entry is 0, all bits in the corresponding cluster of the bitmap +are assumed to be 0. =20 -If an L1 table entry is 1, the corresponding cluster of the bitmap is assu= med -to have all bits set. +If L1 table entry is 1, all bits in the corresponding cluster of the bitmap +are assumed to be 1. =20 -If an L1 table entry is not 0 or 1, it allocates a cluster from the data a= rea. +If an L1 table entry is not 0 or 1, it contains corresponding cluster offs= et +(in 512b sectors). Given an offset in bytes into the bitmap data the offse= t in +bytes into the image file can be obtained as follows: + + offset =3D l1_table[offset / cluster_size] * 512 + (offset % cluster_s= ize) --=20 2.29.2 From nobody Tue Nov 18 22:49:05 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass(p=quarantine dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1614163914; cv=pass; d=zohomail.com; s=zohoarc; b=Z9PjVKdJykYUkdC4/wiscv2ChqqzMawWHnNLR7ikr3l6PGq7hD+hAiCHO8PObpCG5phK8+XsKDFry6XUwgyO23Bk7nFP/sM/McF9u6skZJfhzcO4KEPtTGPI6hLewMIxSNh1uK2zxPkw0ytzNFtUsvmKFpkJNptJ0TH93D12rqQ= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614163914; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Y74/Ieo2TPJayegsix7wobuvb3NPrAgOTDMcY3HGGfk=; b=bPgr9Y/WTDWZOI+Pjy8wOba8xXI80B7a65LYVNRvxW5rcXoQ9ybYdwv5kBrI01uTgCNaho0gmlbO+7Ih4i06ycamUuw/UPN1AdvH8CELg8jq3jMIlz0X/RCoKbVHTcdUmYKe8quq5OOr2nobzE6gkrIs1ZJMAd5UTgw2RzCHRgk= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass header.from= (p=quarantine dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1614163913953496.7770837833933; Wed, 24 Feb 2021 02:51:53 -0800 (PST) Received: from localhost ([::1]:58020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lErlo-0003I0-Vy for importer@patchew.org; Wed, 24 Feb 2021 05:51:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lErhg-0006jd-I6; Wed, 24 Feb 2021 05:47:36 -0500 Received: from mail-eopbgr80124.outbound.protection.outlook.com ([40.107.8.124]:36517 helo=EUR04-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lErhe-0007Jd-Oc; Wed, 24 Feb 2021 05:47:36 -0500 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB4951.eurprd08.prod.outlook.com (2603:10a6:20b:eb::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Wed, 24 Feb 2021 10:47:28 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::f1f0:6610:11f5:5e4a]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::f1f0:6610:11f5:5e4a%9]) with mapi id 15.20.3868.032; Wed, 24 Feb 2021 10:47:28 +0000 Received: from localhost.localdomain (185.215.60.244) by HE1PR05CA0177.eurprd05.prod.outlook.com (2603:10a6:3:f8::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Wed, 24 Feb 2021 10:47:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kq8tDVHlkkRVjzC4Bn77hfvuqVjwW+EPeA6AQRon8aFd/Osn2f2o9/Q9URwXUX294qhGte+x8L+KMtO290xnwkQ+vYEHVCZPZsxT0U1o4MSL7VDsM+IoU5zFqAyhQhhzXHHLuLPrZt0TzzLMxlgYoaRlCRPYqY0W5BfsPnBhzg6gMIIS1vfqlr97pa2a8lh3hZVDgZHE5vd78EpLLMm9RySoyRFNWn3Abuadl/6Z0nfV4C6Nws1w5dn+gzh7ZKu3DGgepS0AOogdlhVH6Lw8ScMRFzVbWxFBxKvDGI32ig77Ya3Laf4Lxfmo1GuKZYrIH/WVkttimq7cErrWxVgT8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y74/Ieo2TPJayegsix7wobuvb3NPrAgOTDMcY3HGGfk=; b=eyWUdVurvd6i6+EuoZGOjM/qn1bn2aJng5HvZ/l0hOgYsvOEJT6c3HhcZIAbqXoxzwWkxRj5QpXyLcwJvyvqrTnbW5icye3CSKyLcCCa+y+mBleZHVrRucm5CJJNJc6vRmkgkfeMdxGZV24pbbgcvtLYvLWvOoKHh+ni6A9XSmYPkH16sU22uIs+jTXNmCS/x/UdYPcLfWug+WKVx1R9DqCGXNDSov8spyqwIZG0sy8DbtwYM92ir6WQ1+GRzPY/sPluQsYtAxzF8kNojyFQgsBWCuRyE8HrjHg3NzuvcIpCSM3yc94qVXMHusCVtYk5kzr/wWT+qlee2txT6vhUYA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y74/Ieo2TPJayegsix7wobuvb3NPrAgOTDMcY3HGGfk=; b=O7r7VyTGzj1UTvfy/GpJSy+4NnPc3pLTe9pbrKXFdwi7qEZrvCgWuN1tBXhyf+yKJpYLY7Q9uBRUmC90f9Ut427s9POLF7KxIgQs0UgTuH70ANgK/KHi5v8KTdewNowiAG9Ehs2Oq6JX0HlAtl/MHYTq8cVfxC3Oqa0x+A16Fec= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=virtuozzo.com; From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, den@openvz.org, stefanha@redhat.com, mreitz@redhat.com, kwolf@redhat.com, jsnow@redhat.com, vsementsov@virtuozzo.com, eblake@redhat.com Subject: [PATCH v2 3/6] block/parallels: BDRVParallelsState: add cluster_size field Date: Wed, 24 Feb 2021 13:47:04 +0300 Message-Id: <20210224104707.88430-4-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210224104707.88430-1-vsementsov@virtuozzo.com> References: <20210224104707.88430-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [185.215.60.244] X-ClientProxiedBy: HE1PR05CA0177.eurprd05.prod.outlook.com (2603:10a6:3:f8::25) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a810cd1e-d178-4562-6a9d-08d8d8b1946c X-MS-TrafficTypeDiagnostic: AM6PR08MB4951: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:227; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 97ct+gwgZ+c0VFrGjZMpOlNhVNA/SOrkfi0A5JUCJQkOkAFgj/rrnQ3tknxhloaLJKwm8nx0vKiFH/HqMgK1vQiMxZTtOu63ZYQ9sPi4ZpPm/dB65w5WUoV8JpdtiD9ZHdKSyMOECxR99q9fQYBPd91rm+8Wm3FW4pRve9JEiPfpWHGA9ofekerdM+L6XZ+ok+qi9Ui/fl/tuDfMC72mVnIbqpVKuPQzwt33DGQdRHFDYV8fSUFNGKnTAa7fvY7GI2lnO0NYNMEeacTRkNPBVHXEpOL1ey1Ajekys9tUVgGEk2IETEJ2dCxYk+AqxaERhKEgVlu7xg0bbbFYlvZqIP1QU4NgSlqZf9lVhtLPwOvrKV4XpYtFC4w5XjGoDDXcq512ptTgE4hg3qiQ2F56wEZaTap1UpzpSLycSHh+fUB2EZfeNDXkIYMMEdzFrlXCFHHm4GVARvaZeTL3b0v5vki89P0oIXWxPAFFSNAe+M5Y90HU4VcRHc4QnNqtgS6GA64zrDq+H0tyjuXmYI4tkDVrG248ynVXcmWT7mH5SN5h/CJA4wWjkknsi4j9R6HD3gKH/kQAEeHX1JhQuw4Bbg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(39840400004)(136003)(376002)(366004)(396003)(186003)(956004)(2616005)(36756003)(66946007)(2906002)(8936002)(6916009)(26005)(83380400001)(8676002)(16526019)(5660300002)(316002)(52116002)(6506007)(86362001)(4326008)(6512007)(478600001)(6486002)(1076003)(66556008)(69590400012)(66476007)(6666004); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?xojvHW93exhUuqx4U1Mv5DBlQEXtDa9QVnfPc/MbaX0/q8zCU1U4wWWbSEsO?= =?us-ascii?Q?WEhUzpExZRbegxwa+rGILnbDej4sJtYUXlr6uahy4c9K9vh/5SYB3N99DKE8?= =?us-ascii?Q?suPfhWvsf/Z2s6dILNCjl9HNelahcIuc9IZF30740zqYBzSBWwjLG6cAbHWg?= =?us-ascii?Q?pXM0E1LmGNUL6XQ5Qm01XVbwgZju9GD2hOonksICmzVoimm1u1QHzwQeBZkv?= =?us-ascii?Q?zGqkjc8L0lHpZ5tUwHmMwl6eCz7WeP0iDbMiKMhUkI/u5YHGVntkaWmNqvaU?= =?us-ascii?Q?TfMsR7jT/FHfTQCTHN6JyWBcbD53QOX6sfLqYtUWIUEfBkYVTFMz1EqfdHWg?= =?us-ascii?Q?ZGYOXNeWJQynX0GMYQ7cyjaIr7x10xQ/CTaD8Bn2h96NVXSIejitYEYp786L?= =?us-ascii?Q?pjK+MU42vymPVPel0JwXwQlgkUW9biyc6WuE9DSFstaMVzE2LtzsOgJHD/V5?= =?us-ascii?Q?08DnAgET5IjZHMnoBgxpjOJSIVUsp92yqhcoXk/RYDx6AeMFYP4SC5Kd1OQl?= =?us-ascii?Q?HhQRNWTfTx6ygx1EP62Wgi23kCboDvTZ17A0eEMsYc+ON78w7Up0V0etgtvP?= =?us-ascii?Q?H+7uH72j0nzVnlrbv0nW1cduew+VDHyz1rYzEY89hNqjT8wGwtDi0m0ydqOW?= =?us-ascii?Q?wAgtaNBHfWWuX2MeWO6IoB9RUlJp5IFpnsWm6jEFEt8XplKWDKq3yW6VYXBG?= =?us-ascii?Q?20NG3fGQMzRV4OSRxiAWiRn/m5a8wpUzQO6yvx5A9M4yi2jWX3sQxW/KfaT1?= =?us-ascii?Q?vOtyqFNbauwIknzxQjZts6ZXmjixRnfht6v9OsIZREZFhY3YnqV4AFTC8+Pf?= =?us-ascii?Q?wvRQl3toh2TEguYT9iVP6S15eocSkHHn/HZ78OkuFCkR4IIzpf0iCVhnFWiS?= =?us-ascii?Q?uf+zd21ThmK/ZxFAQqsLWmlfl82MVukDN00h9Sd69TxRZe9AwE6p2YPJFeRy?= =?us-ascii?Q?fKWKtrnzJWDYha4gWsZP4yZ9+zQwZx8JBqdAk5ZZtMx6wuCgnKDnu+qY6F5A?= =?us-ascii?Q?uQp7WuzB+9b/sPooMNoM1qfjxO7vxY+yi4mtxPqYmLVQAA50/kwaeAZ0nzJI?= =?us-ascii?Q?f7Y2Ye5wXVKHSkpdM+Q3s6BBSWH8YTqsLykJogc3AtCGlXkeQHeAsy2/qcEU?= =?us-ascii?Q?iZ1N2NMd3FBybIxdOn4pf7tYnVe9XCaRkrytdQDo3nJmBfb5PcLvXN29v4yj?= =?us-ascii?Q?b0aFk6Yd1v6xWLfAvSD2QsNMgnRP2384W9s2OdKVVsxjTTzCUJx16B9Tv2NX?= =?us-ascii?Q?quwLBJZCOY27p4d/R4cAMmjTZpW0lXPbSdmdIcDEp8ACOEEWF2i0wInHOq3/?= =?us-ascii?Q?f1w0BoGTMvgF0XWd210R1O/L?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a810cd1e-d178-4562-6a9d-08d8d8b1946c X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2021 10:47:28.5561 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: oxpKrN3V2f4T79zHNPwpG5Hi4fIuuPvuYGblGIt6+hV5RFrmt+Umttxe9yoLuIYvZDwluA4bO2Ple31GPuID8Z81slI/53Eiyia/OCDb70k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4951 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=40.107.8.124; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @virtuozzo.com) Content-Type: text/plain; charset="utf-8" We are going to use it in more places, calculating "s->tracks << BDRV_SECTOR_BITS" doesn't look good. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Denis V. Lunev --- block/parallels.h | 1 + block/parallels.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/block/parallels.h b/block/parallels.h index 5aa101cfc8..9a9209e320 100644 --- a/block/parallels.h +++ b/block/parallels.h @@ -79,6 +79,7 @@ typedef struct BDRVParallelsState { ParallelsPreallocMode prealloc_mode; =20 unsigned int tracks; + unsigned int cluster_size; =20 unsigned int off_multiplier; Error *migration_blocker; diff --git a/block/parallels.c b/block/parallels.c index 3c22dfdc9d..9594d84978 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -421,7 +421,6 @@ static int coroutine_fn parallels_co_check(BlockDriverS= tate *bs, int ret; uint32_t i; bool flush_bat =3D false; - int cluster_size =3D s->tracks << BDRV_SECTOR_BITS; =20 size =3D bdrv_getlength(bs->file->bs); if (size < 0) { @@ -472,7 +471,7 @@ static int coroutine_fn parallels_co_check(BlockDriverS= tate *bs, high_off =3D off; } =20 - if (prev_off !=3D 0 && (prev_off + cluster_size) !=3D off) { + if (prev_off !=3D 0 && (prev_off + s->cluster_size) !=3D off) { res->bfi.fragmented_clusters++; } prev_off =3D off; @@ -487,10 +486,10 @@ static int coroutine_fn parallels_co_check(BlockDrive= rState *bs, } } =20 - res->image_end_offset =3D high_off + cluster_size; + res->image_end_offset =3D high_off + s->cluster_size; if (size > res->image_end_offset) { int64_t count; - count =3D DIV_ROUND_UP(size - res->image_end_offset, cluster_size); + count =3D DIV_ROUND_UP(size - res->image_end_offset, s->cluster_si= ze); fprintf(stderr, "%s space leaked at the end of the image %" PRId64= "\n", fix & BDRV_FIX_LEAKS ? "Repairing" : "ERROR", size - res->image_end_offset); @@ -771,6 +770,7 @@ static int parallels_open(BlockDriverState *bs, QDict *= options, int flags, ret =3D -EFBIG; goto fail; } + s->cluster_size =3D s->tracks << BDRV_SECTOR_BITS; =20 s->bat_size =3D le32_to_cpu(ph.bat_entries); if (s->bat_size > INT_MAX / sizeof(uint32_t)) { --=20 2.29.2 From nobody Tue Nov 18 22:49:05 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass(p=quarantine dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1614163794; cv=pass; d=zohomail.com; s=zohoarc; b=DawIs1HIUdGKt9yaPyQ5QML8peYnpPsMRRiFM0XIKV9lsfzNozRmBxJsHbnIfY7AtLhqc+ans4UurbsTdvwElPptbqMUmYXrFX0X3ftFx/vxEdkWchfQw+R//eFZVS9BgejkXuEebPRArLjEo7NXO0sT4ioA6A7xUhmv7drr4pw= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614163794; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7ZAXcbUYWuNxT7W78l3oP7eQ/GspDYC8NL3NhRFJJ+0=; b=lxlu8o/F0+xhTC8BYd6o+y1nwCsiKnE9ZkBA5Jl7znKhqlJd1udTMG7vCIUMghZnhvtF3Ts2sv65F/GKKrZVz+p6HZyeCFe1RYvMmbub8SAqPCp7J8JmgMfflLq2lH+p7NY/cC7aFM4Wq+Eo0B/GngGl+76AP4xLPHjt6j8qtiQ= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass header.from= (p=quarantine dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161416379394297.01057687307195; Wed, 24 Feb 2021 02:49:53 -0800 (PST) Received: from localhost ([::1]:52438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lErjs-0000tj-P0 for importer@patchew.org; Wed, 24 Feb 2021 05:49:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lErhj-0006sJ-U0; Wed, 24 Feb 2021 05:47:39 -0500 Received: from mail-eopbgr80124.outbound.protection.outlook.com ([40.107.8.124]:36517 helo=EUR04-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lErhh-0007Jd-Ao; Wed, 24 Feb 2021 05:47:39 -0500 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB4951.eurprd08.prod.outlook.com (2603:10a6:20b:eb::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Wed, 24 Feb 2021 10:47:30 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::f1f0:6610:11f5:5e4a]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::f1f0:6610:11f5:5e4a%9]) with mapi id 15.20.3868.032; Wed, 24 Feb 2021 10:47:30 +0000 Received: from localhost.localdomain (185.215.60.244) by HE1PR05CA0177.eurprd05.prod.outlook.com (2603:10a6:3:f8::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Wed, 24 Feb 2021 10:47:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=giHosXqtz+6VxLHQ8U3S+mf4b7cYV3tS4Z8HWTIZjmyuFTBja+STGeKQ1iZaQ24/fimu4tTHR3Z/KRacbf2ucyowOC1+AuPxqSYnHQK6BvXkhw3L33vAPpPcO4WNFiL74EunwXXPzOlJEp2AHPXtblu+ERBjRZtS8zKn7bMAKzZ+LDCLSiFhvxZguFoZ7kkItV5qCxure0Qc8jtzYtgcouIT0v24h4zanlfAWvJ/lnVUexhSQ3DYjM8rvy93nsaUYuBSDUG04kHr6qSB4l8nhuIgktwz3tU2MlSuaAv5Xijn5YRnaRbJtqXGjDOlFVYTWVVcWxfiyUDci3Twlyy2UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7ZAXcbUYWuNxT7W78l3oP7eQ/GspDYC8NL3NhRFJJ+0=; b=FHjVkk+MnfJobr0u6mHB8xnl2JLkebFcu1e7hspZxlIbneHfhFGeKfFsQwZaJDf9PZUrLO/C+XGWeoflNnBMRFa9RvPpTun7tiSjaRlDPAH9MT+9wTakmQD92+d3TMOPVjf64yOi65eCSQSIs2Ek21q3zMCN73QrSXRbMn/0U9XRu/jYspjgHvqGsR8PtMr4wbY2f1o1P5lm0/KvRqGwxBU6K1IM3Yd9EKN+PL72lzMVQNDGw30/WYWIrwSQs0ylHp0bhp3nDF4A6lfdHaTW45mOCoFWBN/GMayEZafS607sbR9RW2wvFpWa8UzlJH4oOAHLeVeg3bmm8Vo8i3u+0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7ZAXcbUYWuNxT7W78l3oP7eQ/GspDYC8NL3NhRFJJ+0=; b=Z4UUdOOwhNxNkBBqX08H2sdZH5llCPwPfwtP7LhEXjm+1FvU7yPjsd+4DGvYJcVbMQ2u4eA1/v5zK3YQLaTsT5U8cJQDhmfWwWNx+LLQPwMZk1yWVdyQbQmrYHqh1U/qytkFOoGoh3COlXorBpKmvTtAQv7KagX36GoN/lqB5dQ= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=virtuozzo.com; From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, den@openvz.org, stefanha@redhat.com, mreitz@redhat.com, kwolf@redhat.com, jsnow@redhat.com, vsementsov@virtuozzo.com, eblake@redhat.com Subject: [PATCH v2 4/6] parallels: support bitmap extension for read-only mode Date: Wed, 24 Feb 2021 13:47:05 +0300 Message-Id: <20210224104707.88430-5-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210224104707.88430-1-vsementsov@virtuozzo.com> References: <20210224104707.88430-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [185.215.60.244] X-ClientProxiedBy: HE1PR05CA0177.eurprd05.prod.outlook.com (2603:10a6:3:f8::25) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e833fb6e-ef3d-4404-bd7c-08d8d8b1954b X-MS-TrafficTypeDiagnostic: AM6PR08MB4951: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:353; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: knjKqh6t5JvgONklzKXUfVP+uHiJf58LCjLirjmMQHHyOuw+d+0ws0rUFf6UuHQOsxQP4JCefj6QeKvjs3SMm2GtwJEQutXZ6H/s+7cuEd4AYSnFgEDDlz4Wqgw2miylYbLMRtBGhXpfrwui9mh1B1wXM/YQaf66cWrj3VhMhb27pH5wSaDhh7sLUMyGivP6vN2kOB9qWXuRbfTA0hyKi8h8gPv67trhwWDRZsGUmwdl4GrVFnYvtI5mBf6z0WtgukdiuFlCAMS143927xYX9qDz5WU3FFDqEZmIFN/3mbGoX1tYiekflICXIPFhbhNbHjE7B1lDznc3kvq06nKZtQZPRUPLw4o+Qyh7ONiFh+4kiY2sSQ7mUU2JVCdVhMICQ1hfIl+KMVdddUGzJGMLc24YjtseRabfty+sLHlKZYcGuQktVGWLy6QKLWUew4dt7nnsZ7ULFtoJnhc+1d6G6HZva6CV26ZVAQKBP1kzxiHm6JYUqznfhd4a8jef8OEm64bdDwdsT2HiI6V4qjwAsAwg592Jilb9LdDW6Yx3MKcssJ6DbyANwotw8j4ze4aX7kJdpGCOGHcNMUEhj2492Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(39840400004)(136003)(376002)(366004)(396003)(186003)(956004)(2616005)(36756003)(66946007)(2906002)(8936002)(6916009)(26005)(83380400001)(8676002)(16526019)(5660300002)(316002)(30864003)(52116002)(6506007)(86362001)(4326008)(6512007)(478600001)(6486002)(1076003)(66556008)(69590400012)(66476007)(6666004); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?NV9SZCx0uyaq2Ad6n5PHoBbp8UYegzvGexwbtNNWXiD98K49Ousa6KsEOY/e?= =?us-ascii?Q?3toNiQVchm7ap9rrhE7m6hhTo0jiNhkhgMHV4jqnwir3fDuDHWA2KS4mWKRh?= =?us-ascii?Q?pMcY1UrzKuR8TUuDsk1doz88zRwCvY1x7Vk4RbsHd4XkOx9H+tUPSpjtDILA?= =?us-ascii?Q?sakoLnkW8+a1pSduLEDYsoEj6QjsCT7Zq3XqSeSi/b6727JJjJZ6mmHKOXZA?= =?us-ascii?Q?zyRvdgUrmrmw37zMGfv6l/O4sgJIOsZfFU9m/dp3ULNIn1DR0iui/E9ZQku5?= =?us-ascii?Q?sSWkSxk/+ZjGo1wqFAMK4bfjLeXT6FqARTa1GKh6alStHZhUEnD5YLPeMrHM?= =?us-ascii?Q?dIkW4IX87Q+ip1H5fdcAGPl+HPcDdU7PmqSuNNXrR4VJOi5vGx3cRBiSWXii?= =?us-ascii?Q?IFmdm5AjE3rKmGijqxIsLnU1yB7MQManb+SiAA8YA3bAJCxAlRzEhGghhMzh?= =?us-ascii?Q?cGr2K7Y8e4RD1n9msO7V1SOvsRBSJv1eJDNEUAa0KNWFKHTu2/b3Vs+Gu6M5?= =?us-ascii?Q?T4jSnTvvgeyC8m80ZrLnt5sAJl0/ateNYf1HWCGVneSGMI1JpMJQ0qt2Xfeq?= =?us-ascii?Q?+LusayR8SjE1w3kYLnk86NkjyOZbIudtzpZTns39cYGzEfrkDeerGl8qIhpD?= =?us-ascii?Q?187oulHqZZI40dF8MJavWSiE4OMgfpOomoe2eHijk0UGJSNM/kG+gKQ8BFil?= =?us-ascii?Q?klIQBARCFUPWR9V71Uxcb870ZVkKgTkw8MooPgS4Qj8uz5igG/Rhy0jopBNF?= =?us-ascii?Q?X1ZP4pdQ3OaG1SPOR+/WOA3+4PB9unFw2gQVkJ3yyiqaB+weo2BFnrhGv/ml?= =?us-ascii?Q?e85cR+3mmX1gZ26JOwZc52fvyAUtUObirPPQUFUejQ4P/hfq+Vq7MXW917b1?= =?us-ascii?Q?oOE9xTnAce6iFY3IOAu09XxVGwlJA83GWAoZ5oeuo6nMDe1QKCyhlY4msMVF?= =?us-ascii?Q?ZqkRIbVRBnHkxtni8sfhxQSAo0gPFsHIPlt9yBRYVxmhhqHiRydmq37jySEv?= =?us-ascii?Q?dtvC00+qstIVZb6EDru28YFbqAvx4dxdWyfgKzpHr28AHvSEYYhzT8XhCtqw?= =?us-ascii?Q?U3mrgQZnhJNcyhuLSbRRPhtHQLot30IDdnUG9k+oeghsBRgXvQmBE/DvbBmP?= =?us-ascii?Q?i8mMNl9eVsqmUNa7VmFptg+6Pd2/rfyfMnbh7KiuGNnxKtVyJg98+29DTXBV?= =?us-ascii?Q?G0z4fVtbiHiH7q9SefFUGsiFVSeg7mAKFPrzLKZqfnQqK0wslsOzcP+mkYR+?= =?us-ascii?Q?wm0j7QN3QQvh05IMOfZBfuW9ua3I4y6iOgIaiVuhhp/EASM+OrWmmEacvbGp?= =?us-ascii?Q?zUTwDJz2o7DhzgGjE9WmwrZV?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e833fb6e-ef3d-4404-bd7c-08d8d8b1954b X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2021 10:47:30.1223 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aXOIVmna3D4TmC84E9teUTr+wNNvY1CjhyxtKjMKrrEqzHeBsUwfhMcNvEkCeWdJbS9XxZmtDHuwWKbFsbsRYeERwgLOOCuAYS5MvYrb5Qg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4951 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=40.107.8.124; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @virtuozzo.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Denis V. Lunev --- block/parallels.h | 6 +- block/parallels-ext.c | 300 ++++++++++++++++++++++++++++++++++++++++++ block/parallels.c | 18 +++ block/meson.build | 3 +- 4 files changed, 325 insertions(+), 2 deletions(-) create mode 100644 block/parallels-ext.c diff --git a/block/parallels.h b/block/parallels.h index 9a9209e320..f22f43f988 100644 --- a/block/parallels.h +++ b/block/parallels.h @@ -48,7 +48,8 @@ typedef struct ParallelsHeader { uint64_t nb_sectors; uint32_t inuse; uint32_t data_off; - char padding[12]; + uint32_t flags; + uint64_t ext_off; } QEMU_PACKED ParallelsHeader; =20 typedef enum ParallelsPreallocMode { @@ -85,4 +86,7 @@ typedef struct BDRVParallelsState { Error *migration_blocker; } BDRVParallelsState; =20 +int parallels_read_format_extension(BlockDriverState *bs, + int64_t ext_off, Error **errp); + #endif diff --git a/block/parallels-ext.c b/block/parallels-ext.c new file mode 100644 index 0000000000..e0dd0975c6 --- /dev/null +++ b/block/parallels-ext.c @@ -0,0 +1,300 @@ +/* + * Support of Parallels Format Extension. It's a part of Parallels format + * driver. + * + * Copyright (c) 2021 Virtuozzo International GmbH + * + * Permission is hereby granted, free of charge, to any person obtaining a= copy + * of this software and associated documentation files (the "Software"), t= o deal + * in the Software without restriction, including without limitation the r= ights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or se= ll + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included= in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS= OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OT= HER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING= FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS = IN + * THE SOFTWARE. + */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "block/block_int.h" +#include "parallels.h" +#include "crypto/hash.h" +#include "qemu/uuid.h" + +#define PARALLELS_FORMAT_EXTENSION_MAGIC 0xAB234CEF23DCEA87ULL + +#define PARALLELS_END_OF_FEATURES_MAGIC 0x0ULL +#define PARALLELS_DIRTY_BITMAP_FEATURE_MAGIC 0x20385FAE252CB34AULL + +typedef struct ParallelsFormatExtensionHeader { + uint64_t magic; /* PARALLELS_FORMAT_EXTENSION_MAGIC */ + uint8_t check_sum[16]; +} QEMU_PACKED ParallelsFormatExtensionHeader; + +typedef struct ParallelsFeatureHeader { + uint64_t magic; + uint64_t flags; + uint32_t data_size; + uint32_t _unused; +} QEMU_PACKED ParallelsFeatureHeader; + +typedef struct ParallelsDirtyBitmapFeature { + uint64_t size; + uint8_t id[16]; + uint32_t granularity; + uint32_t l1_size; + /* L1 table follows */ +} QEMU_PACKED ParallelsDirtyBitmapFeature; + +/* Given L1 table read bitmap data from the image and populate @bitmap */ +static int parallels_load_bitmap_data(BlockDriverState *bs, + const uint64_t *l1_table, + uint32_t l1_size, + BdrvDirtyBitmap *bitmap, + Error **errp) +{ + BDRVParallelsState *s =3D bs->opaque; + int ret =3D 0; + uint64_t offset, limit; + uint64_t bm_size =3D bdrv_dirty_bitmap_size(bitmap); + uint8_t *buf =3D NULL; + uint64_t i, tab_size =3D + DIV_ROUND_UP(bdrv_dirty_bitmap_serialization_size(bitmap, 0, bm_si= ze), + s->cluster_size); + + if (tab_size !=3D l1_size) { + error_setg(errp, "Bitmap table size %" PRIu32 " does not correspon= d " + "to bitmap size and cluster size. Expected %" PRIu64, + l1_size, tab_size); + return -EINVAL; + } + + buf =3D qemu_blockalign(bs, s->cluster_size); + limit =3D bdrv_dirty_bitmap_serialization_coverage(s->cluster_size, bi= tmap); + for (i =3D 0, offset =3D 0; i < tab_size; ++i, offset +=3D limit) { + uint64_t count =3D MIN(bm_size - offset, limit); + uint64_t entry =3D l1_table[i]; + + if (entry =3D=3D 0) { + /* No need to deserialize zeros because @bitmap is cleared. */ + continue; + } + + if (entry =3D=3D 1) { + bdrv_dirty_bitmap_deserialize_ones(bitmap, offset, count, fals= e); + } else { + ret =3D bdrv_pread(bs->file, entry << BDRV_SECTOR_BITS, buf, + s->cluster_size); + if (ret < 0) { + error_setg_errno(errp, -ret, + "Failed to read bitmap data cluster"); + goto finish; + } + bdrv_dirty_bitmap_deserialize_part(bitmap, buf, offset, count, + false); + } + } + ret =3D 0; + + bdrv_dirty_bitmap_deserialize_finish(bitmap); + +finish: + qemu_vfree(buf); + + return ret; +} + +/* + * @data buffer (of @data_size size) is the Dirty bitmaps feature which + * consists of ParallelsDirtyBitmapFeature followed by L1 table. + */ +static BdrvDirtyBitmap *parallels_load_bitmap(BlockDriverState *bs, + uint8_t *data, + size_t data_size, + Error **errp) +{ + int ret; + ParallelsDirtyBitmapFeature bf; + g_autofree uint64_t *l1_table =3D NULL; + BdrvDirtyBitmap *bitmap; + QemuUUID uuid; + char uuidstr[UUID_FMT_LEN + 1]; + int i; + + if (data_size < sizeof(bf)) { + error_setg(errp, "Too small Bitmap Feature area in Parallels Forma= t " + "Extension: %zu bytes, expected at least %zu bytes", + data_size, sizeof(bf)); + return NULL; + } + memcpy(&bf, data, sizeof(bf)); + bf.size =3D le64_to_cpu(bf.size); + bf.granularity =3D le32_to_cpu(bf.granularity) << BDRV_SECTOR_BITS; + bf.l1_size =3D le32_to_cpu(bf.l1_size); + data +=3D sizeof(bf); + data_size -=3D sizeof(bf); + + if (bf.size !=3D bs->total_sectors) { + error_setg(errp, "Bitmap size (in sectors) %" PRId64 " differs fro= m " + "disk size in sectors %" PRId64, bf.size, bs->total_sec= tors); + return NULL; + } + + if (bf.l1_size * sizeof(uint64_t) > data_size) { + error_setg(errp, "Bitmaps feature corrupted: l1 table exceeds " + "extension data_size"); + return NULL; + } + + memcpy(&uuid, bf.id, sizeof(uuid)); + qemu_uuid_unparse(&uuid, uuidstr); + bitmap =3D bdrv_create_dirty_bitmap(bs, bf.granularity, uuidstr, errp); + if (!bitmap) { + return NULL; + } + + l1_table =3D g_new(uint64_t, bf.l1_size); + for (i =3D 0; i < bf.l1_size; i++, data +=3D sizeof(uint64_t)) { + l1_table[i] =3D ldq_le_p(data); + } + + ret =3D parallels_load_bitmap_data(bs, l1_table, bf.l1_size, bitmap, e= rrp); + if (ret < 0) { + bdrv_release_dirty_bitmap(bitmap); + return NULL; + } + + /* We support format extension only for RO parallels images. */ + assert(!(bs->open_flags & BDRV_O_RDWR)); + bdrv_dirty_bitmap_set_readonly(bitmap, true); + + return bitmap; +} + +static int parallels_parse_format_extension(BlockDriverState *bs, + uint8_t *ext_cluster, Error **= errp) +{ + BDRVParallelsState *s =3D bs->opaque; + int ret; + int remaining =3D s->cluster_size; + uint8_t *pos =3D ext_cluster; + ParallelsFormatExtensionHeader eh; + g_autofree uint8_t *hash =3D NULL; + size_t hash_len =3D 0; + GSList *bitmaps =3D NULL, *el; + + memcpy(&eh, pos, sizeof(eh)); + eh.magic =3D le64_to_cpu(eh.magic); + pos +=3D sizeof(eh); + remaining -=3D sizeof(eh); + + if (eh.magic !=3D PARALLELS_FORMAT_EXTENSION_MAGIC) { + error_setg(errp, "Wrong parallels Format Extension magic: 0x%" PRI= x64 + ", expected: 0x%llx", eh.magic, + PARALLELS_FORMAT_EXTENSION_MAGIC); + goto fail; + } + + ret =3D qcrypto_hash_bytes(QCRYPTO_HASH_ALG_MD5, (char *)pos, remainin= g, + &hash, &hash_len, errp); + if (ret < 0) { + goto fail; + } + + if (hash_len !=3D sizeof(eh.check_sum) || + memcmp(hash, eh.check_sum, sizeof(eh.check_sum)) !=3D 0) { + error_setg(errp, "Wrong checksum in Format Extension header. Forma= t " + "extension is corrupted."); + goto fail; + } + + while (true) { + ParallelsFeatureHeader fh; + BdrvDirtyBitmap *bitmap; + + if (remaining < sizeof(fh)) { + error_setg(errp, "Can not read feature header, as remaining by= tes " + "(%d) in Format Extension is less than Feature head= er " + "size (%zu)", remaining, sizeof(fh)); + goto fail; + } + + memcpy(&fh, pos, sizeof(fh)); + pos +=3D sizeof(fh); + remaining -=3D sizeof(fh); + + fh.magic =3D le64_to_cpu(fh.magic); + fh.flags =3D le64_to_cpu(fh.flags); + fh.data_size =3D le32_to_cpu(fh.data_size); + + if (fh.flags) { + error_setg(errp, "Flags for extension feature are unsupported"= ); + goto fail; + } + + if (fh.data_size > remaining) { + error_setg(errp, "Feature data_size exceedes Format Extension " + "cluster"); + goto fail; + } + + switch (fh.magic) { + case PARALLELS_END_OF_FEATURES_MAGIC: + return 0; + + case PARALLELS_DIRTY_BITMAP_FEATURE_MAGIC: + bitmap =3D parallels_load_bitmap(bs, pos, fh.data_size, errp); + if (!bitmap) { + goto fail; + } + bitmaps =3D g_slist_append(bitmaps, bitmap); + break; + + default: + error_setg(errp, "Unknown feature: 0x%" PRIu64, fh.magic); + goto fail; + } + + pos =3D ext_cluster + QEMU_ALIGN_UP(pos + fh.data_size - ext_clust= er, 8); + } + +fail: + for (el =3D bitmaps; el; el =3D el->next) { + bdrv_release_dirty_bitmap(el->data); + } + g_slist_free(bitmaps); + + return -EINVAL; +} + +int parallels_read_format_extension(BlockDriverState *bs, + int64_t ext_off, Error **errp) +{ + BDRVParallelsState *s =3D bs->opaque; + int ret; + uint8_t *ext_cluster =3D qemu_blockalign(bs, s->cluster_size); + + assert(ext_off > 0); + + ret =3D bdrv_pread(bs->file, ext_off, ext_cluster, s->cluster_size); + if (ret < 0) { + error_setg_errno(errp, -ret, "Failed to read Format Extension clus= ter"); + goto out; + } + + ret =3D parallels_parse_format_extension(bs, ext_cluster, errp); + +out: + qemu_vfree(ext_cluster); + + return ret; +} diff --git a/block/parallels.c b/block/parallels.c index 9594d84978..6ebad2a2bb 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -29,6 +29,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/error-report.h" #include "qapi/error.h" #include "block/block_int.h" #include "block/qdict.h" @@ -843,6 +844,23 @@ static int parallels_open(BlockDriverState *bs, QDict = *options, int flags, goto fail_options; } =20 + if (ph.ext_off) { + if (flags & BDRV_O_RDWR) { + /* + * It's unsafe to open image RW if there is an extension (as we + * don't support it). But parallels driver in QEMU historically + * ignores the extension, so print warning and don't care. + */ + warn_report("Format Extension ignored in RW mode"); + } else { + ret =3D parallels_read_format_extension( + bs, le64_to_cpu(ph.ext_off) << BDRV_SECTOR_BITS, errp); + if (ret < 0) { + goto fail; + } + } + } + if ((flags & BDRV_O_RDWR) && !(flags & BDRV_O_INACTIVE)) { s->header->inuse =3D cpu_to_le32(HEADER_INUSE_MAGIC); ret =3D parallels_update_header(bs); diff --git a/block/meson.build b/block/meson.build index eeaefe5809..d21990ec95 100644 --- a/block/meson.build +++ b/block/meson.build @@ -57,7 +57,8 @@ block_ss.add(when: 'CONFIG_QED', if_true: files( 'qed-table.c', 'qed.c', )) -block_ss.add(when: [libxml2, 'CONFIG_PARALLELS'], if_true: files('parallel= s.c')) +block_ss.add(when: [libxml2, 'CONFIG_PARALLELS'], + if_true: files('parallels.c', 'parallels-ext.c')) block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-a= io.c')) block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref,= iokit]) block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c')) --=20 2.29.2 From nobody Tue Nov 18 22:49:05 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass(p=quarantine dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1614163938; cv=pass; d=zohomail.com; s=zohoarc; b=EtoewkUW6J6NAT3DGBnV9syjkqyM5u58PVS1/ULX0XFwZn7BJoSYmjSA2fTraJ/WaxHcA3gzrJTRkpl5AlMU3+Zdy7cQSy7KUclWjldzjYd2cjiafpVRZvn7vexFTgYAv19vZU+Hm082Lan0MBiMHyiGN7SdDKCDnLh7gv+vKjk= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614163938; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HQl7AgIhQlAfhNGfT8b9lWU7zSJAvVmRANDnjxdJ8Lk=; b=K4sPTQVuoHr9ORvcZRRmTbzqOdbCz77+so3SdI4EZlEHkdPy2UkSdJkkRStzSaLw3flmvan6/HkzImpl9A9o08k5BzlePtNhoVO9VbBmX2qFhZadIDb5/LyfEBpeSvAEVnaCY4mjWXsgjUyk4HqsL9LPit1hqD2Sm0GPZcZGbPo= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass header.from= (p=quarantine dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1614163938054513.7516458959665; Wed, 24 Feb 2021 02:52:18 -0800 (PST) Received: from localhost ([::1]:60038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lErmD-00048m-2v for importer@patchew.org; Wed, 24 Feb 2021 05:52:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lErhm-0006z9-G3; Wed, 24 Feb 2021 05:47:42 -0500 Received: from mail-eopbgr80124.outbound.protection.outlook.com ([40.107.8.124]:36517 helo=EUR04-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lErhk-0007Jd-PS; Wed, 24 Feb 2021 05:47:42 -0500 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB4951.eurprd08.prod.outlook.com (2603:10a6:20b:eb::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Wed, 24 Feb 2021 10:47:31 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::f1f0:6610:11f5:5e4a]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::f1f0:6610:11f5:5e4a%9]) with mapi id 15.20.3868.032; Wed, 24 Feb 2021 10:47:31 +0000 Received: from localhost.localdomain (185.215.60.244) by HE1PR05CA0177.eurprd05.prod.outlook.com (2603:10a6:3:f8::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Wed, 24 Feb 2021 10:47:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BU9Wc4i7CJSxiQAdjDfTBB/waWuYUQKWx/7ffPQNHNDIrMOf4b/YTY85bQ5fFdVCgEYxrhkkgPgBedbYnP6HGa1HdfFSa27nN+kxu/Oz6FxvW93C6kqiYJx4ln62wKWd46j2CVFiO5viLCWS6LPWoMlzrb/hggCLZzBgDP7snqFuxjR9p4FgNynfJSfKYwiETMt3IrBQY3vaAXieR0kry7MsuSEkboJ5L8Bu4Kpx91hRZ3Y3Ul1ti3cu1ety/IdhMDwfMhgBicQ/d5T1BIPqzwU5m7UXbioTOCNQckazRBxliTJTCwXqDLqGUdiU9enWRvRjvawl4u9JNQ90pFjZCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HQl7AgIhQlAfhNGfT8b9lWU7zSJAvVmRANDnjxdJ8Lk=; b=iYZHDO7GIRe+WjrUa9GQsQv0j3s8wK57YCmTplc0eFwy+GPwdE9fh99Gxy0wSu5yT4uN/eDdVUAhHaXcBJ7myrVdK1WbeuqirNfd2P9a0RVbpu5VNfA2Spbai+1f2qiTEe8oKsTYEE/eXoEdZqwe/Mmfalmu5nnwQkCI8LgXdXcOx5K1gKoGj4JkjQjCSTPqamAmXZUBvSfhemrSgup7Ww/2AUBFWEUB94m32RLlfmihnCmAUFIubBJQifeIrlnGwFezyR5FzggVf1GEyMyKYrDvlHA5PBBKBI4vDE0LUmoP8DxEBkVy/CWK7j4eJyaoY6gjZ+bd+1t/8Dt0mO1e/g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HQl7AgIhQlAfhNGfT8b9lWU7zSJAvVmRANDnjxdJ8Lk=; b=L99pjQkqf1tORCcSj/RgQExZH57ieww2Pe9iPyD/dOTdQYNhclDzPo1TEDxHJR/pSjyJYj18Rgvh9eig5wGHzfgsD3C7ERuta2dQLVje+MM/nqAVnvGuUjMTAFFidA/NhLPiSxYiln6G1l/GELCHl1xqkhx6SD0QFdleY2XQdxY= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=virtuozzo.com; From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, den@openvz.org, stefanha@redhat.com, mreitz@redhat.com, kwolf@redhat.com, jsnow@redhat.com, vsementsov@virtuozzo.com, eblake@redhat.com Subject: [PATCH v2 5/6] iotests.py: add unarchive_sample_image() helper Date: Wed, 24 Feb 2021 13:47:06 +0300 Message-Id: <20210224104707.88430-6-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210224104707.88430-1-vsementsov@virtuozzo.com> References: <20210224104707.88430-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [185.215.60.244] X-ClientProxiedBy: HE1PR05CA0177.eurprd05.prod.outlook.com (2603:10a6:3:f8::25) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e87d54b9-fa73-413a-00ab-08d8d8b19636 X-MS-TrafficTypeDiagnostic: AM6PR08MB4951: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1728; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P/PVLDR+jX5j/2BU57h4/SVHaEM9lAbh4CUKFDgRl8M19xsstVVv0lgJTUBI7jrwC/UkJ6qAvVq4PUlLvHbQ7tjQDDtnuo+aD+bupSpPraDJGazh6gLGdUngrlQKbFN9z57740Sq3jgEAj01+IWfnINuGr6tykqjGitaJEXeUcLo2qbGpPjsKn+vsB82F7Y8sMF920XKd0n+V+e7UjytJILOPisXPC9UEPnJNN6pdN0UiK6xS0TNNiHd8XQFx9vUkMgRFCipfC3tWaMsmw1Nznl2mwF4KZzZh5QXjp4EsORV21cnM6LFZupeLeqL3jEysb4sMoR3KVdhXaiuQdS7yWbyXeUgIX8gS7V/R+i2C0MshMSiAloR7TGCYt/tia0fs0kVjU4hp1Mg7wFpvgEK6SUYnk9es4bpwehyY28qmVqkAC4lYY5/vXnIF6mLOOHCEYj7WnOeusPc71byoNmD3QKb6duJYxhJpn6u+AbpbBJgp5mYOZKHJW5rqi+/yf27tkGwM3/1CUncNSR7vJlAG6BL73Lt0rr15JjYeHYRlFVACZy9Oy3TSESSA/p/hDpS4fIb67LHrGyg2A2KIkwOUw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(39840400004)(136003)(376002)(366004)(396003)(186003)(956004)(2616005)(36756003)(66946007)(2906002)(8936002)(6916009)(26005)(83380400001)(8676002)(16526019)(5660300002)(316002)(52116002)(6506007)(86362001)(4326008)(6512007)(478600001)(6486002)(1076003)(66556008)(69590400012)(66476007)(6666004); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?7C47DB3YQQsqXgTKpm2iMchNK+8Hzqxp40T/i7TGezJ6WHW0cgKNuHTmTxOs?= =?us-ascii?Q?a4LRd1mu9UDscg0DHbxqPMjq60ZfwGpGPnZOcuvWrhNO6gDfbegNBJCacMpe?= =?us-ascii?Q?JZfTwMaZeW197kPTL5l6xGLhANM3/FM3N51lkCZ8qASyxft1NwrcH7CaP1Qg?= =?us-ascii?Q?JKSdjHjMHXLQz6z+Piii9wAY9fxkdsrZ61xsz1E0Za4aY2l+sINl+bJIOZM/?= =?us-ascii?Q?0li7wtMOp1opyHAZTMgJMa50Oiwo0bu7PYqDwgsTmCxcmqGFjMwd7XjJjWgl?= =?us-ascii?Q?S8AGuPMl/AXv6rC6gamdyGEkrxkQcRBXfkvNBKDs819rqmx0XTswPyepmrRz?= =?us-ascii?Q?DxSldy7BQrMKjB3JX45GSPz8+zPHbfbM4AEQ6lUpQBx74Y9m2WdxxpZSXGdP?= =?us-ascii?Q?ySqTRTE9GT1fRIUOWUcxIgixIYPrmLQwX+mrmYBXt+hE+b/UJ68I/WHuhc2B?= =?us-ascii?Q?0PlKByYV4MYev2mkBiArqjC0xAoAChzyFHb6R+j5OdnWX/OimIDJXml14zzZ?= =?us-ascii?Q?F5199hCMhew41DeElq5eQ6shuLqU3GFg6y06uzlYs7AY7wUq9qJ3e5e9sK9s?= =?us-ascii?Q?ax1A8rwh4mtpNruSux8TsDxwxtcx4/itr5pbuhMtObMpDBUdtuBaaYK9YaOv?= =?us-ascii?Q?L5lYFxTo84xWowLN25giJW5SDrzK7aIa5BaCtsM7r8oKh2VdnSDkOBvRIFlf?= =?us-ascii?Q?qoMIABRqiprfXVkxGwZd79luduOSyikWXd1+s2xGCYt2FSB1mN2LZFLWjS6Y?= =?us-ascii?Q?ccB6eKZUW1CIUIo0DFYk9vPn5Pys5A0rL5tq/C/yLCDmZJ2LqHNW5S7rjcPX?= =?us-ascii?Q?9v94NdozX2ztGpZxsZrL7LeGZmNDBTqr/C9CRtLL61ZubXkQkT1fSym8/3Th?= =?us-ascii?Q?RM64vhEFPIM89Ggql9gCVrC8dWu294Nik6KO8mna5dtXMbAWfFYYbEvoo7/v?= =?us-ascii?Q?zvM+ozO1A3250kx17xqbuBzLCwYd0FDWjA6yL7d/xG8KoiR4osvpNyiWSvc1?= =?us-ascii?Q?fHsHAtOX+fVtRB5OK/BzqRYL8t+Vx126owrXx0XSATkIXWCdgzMMKL2gI8+k?= =?us-ascii?Q?lWlAVie+NU9PGLm6ZRZEEgZocStAAoT0AOXMtDV7/Bhl2rA7TWgwnsfNwg/u?= =?us-ascii?Q?Pj6/MIYVaQB+OxZKcvMQvPsQwRzNKM/hqhqZVmRN7LFWlzizBJQFGaWpYmiR?= =?us-ascii?Q?SmVsDqmB4sBwBaLrbITwb/RXRidR4WhYfacskQi6kn0lfFuyQuQzYIw4ILDX?= =?us-ascii?Q?P0VKxPMMP5F0L4Rzg+q4B7wP2FlQeA9QXjPeLCPeRqg8MJ0gGDE6JtDvIEaj?= =?us-ascii?Q?WzpCHJhuEA9z1l0XjELiBE4F?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e87d54b9-fa73-413a-00ab-08d8d8b19636 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2021 10:47:31.5619 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 615ohcfyjtYIC1zouT7qOksodmzFVwq7Q7cG8n6FCwx0jDAjVYtnVNFx78uuvh7Xmtn2EYGW2VUYYBzTDGU3zqZ5WWoDBPEOPdhTHoSVpYg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4951 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=40.107.8.124; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @virtuozzo.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Denis V. Lunev --- tests/qemu-iotests/iotests.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 4e758308f2..90d0b62523 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -17,6 +17,7 @@ # =20 import atexit +import bz2 from collections import OrderedDict import faulthandler import io @@ -24,6 +25,7 @@ import logging import os import re +import shutil import signal import struct import subprocess @@ -96,6 +98,14 @@ os.environ.get('IMGKEYSECRET', '') luks_default_key_secret_opt =3D 'key-secret=3Dkeysec0' =20 +sample_img_dir =3D os.environ['SAMPLE_IMG_DIR'] + + +def unarchive_sample_image(sample, fname): + sample_fname =3D os.path.join(sample_img_dir, sample + '.bz2') + with bz2.open(sample_fname) as f_in, open(fname, 'wb') as f_out: + shutil.copyfileobj(f_in, f_out) + =20 def qemu_tool_pipe_and_status(tool: str, args: Sequence[str], connect_stderr: bool =3D True) -> Tuple[str,= int]: --=20 2.29.2 From nobody Tue Nov 18 22:49:05 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass(p=quarantine dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1614164079; cv=pass; d=zohomail.com; s=zohoarc; b=kg4zyjkmiQ09XBVnWrePI4tx9JlD4Pn6M4RMpcDojklkmKcsKz3+2KzKa3FyVV9YYmCxBjMohH+y9ePDi37tgQXA2vTYRNrzoGs4nZhgOZpECY98BNfbOXRzK7d015f3BGNz4++zLLhGFxR+jS4nkwPfbVHqWQXCJRwrEt6OZso= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614164079; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4PP9Ewt1deV7hDO7UMcSOSL1B3xxcrqQdxPF4QSzhCY=; b=cyxibE3GdVRJwKVTTVSFJfjn5vEk89Qf+yuuf9eJSVj+S7seBrRKXcMLiUum3HsuBU9g3xcPr3PGkcX9R7I1Pib5tOTyQRzrM1JTS/BKbjSj9TwlWLaVDBgs6qfZEjMx8WwuJmGHqgvFAfBVvZPI8Z3+7KJnaxhN6P8cuWIiKR8= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass header.from= (p=quarantine dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16141640788271000.0895558973281; Wed, 24 Feb 2021 02:54:38 -0800 (PST) Received: from localhost ([::1]:37862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEroT-0006jY-Fu for importer@patchew.org; Wed, 24 Feb 2021 05:54:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lErhp-00077R-MA; Wed, 24 Feb 2021 05:47:45 -0500 Received: from mail-eopbgr80124.outbound.protection.outlook.com ([40.107.8.124]:36517 helo=EUR04-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lErhn-0007Jd-7b; Wed, 24 Feb 2021 05:47:45 -0500 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB4951.eurprd08.prod.outlook.com (2603:10a6:20b:eb::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Wed, 24 Feb 2021 10:47:33 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::f1f0:6610:11f5:5e4a]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::f1f0:6610:11f5:5e4a%9]) with mapi id 15.20.3868.032; Wed, 24 Feb 2021 10:47:33 +0000 Received: from localhost.localdomain (185.215.60.244) by HE1PR05CA0177.eurprd05.prod.outlook.com (2603:10a6:3:f8::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Wed, 24 Feb 2021 10:47:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A1gZUlbEcsyXyVeWV1Q3nx3WFxpz6kb9L5deeCH/S2v+qyOXHG+jkf+9bV4m7O/uHfYp8ScouiMqBwn4/rWH/MlUNlkPe6PqYLX7vPMr4eqqQl6uvNVfIz4v+Jk2O4lEUrjv3MFTtUi/xJZbxrP6onz3n1KVQKgYqzIT4xn1JPD9AvDWAcgo2ilVkn0o0TcA5BL3O3Y4j3XgxYrOvbxzQdPSD5jPdjcw8DtkNL+47Mwo0PB5IFLRUXfL7Zf4f4MV6zJnLcKrBDKaWYgYXB+cSRqwcDhE3W/ZlT51TdCZVIlW01Xj4rLEjIkKDLSmRNe1OnTlLafDcMis8i1xMsFphg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4PP9Ewt1deV7hDO7UMcSOSL1B3xxcrqQdxPF4QSzhCY=; b=kzeTY0W3nHLKz4OduqWi+Jbl0eWoq0PfSfeqpzsf4UgLMTKC2KnyjsD7sq4ihFklHdwNWOCIJC+9NXKQyFeE04IFOwQIV7/UT91oNCSq5qa0z/o+uui7mmqSGkYVhoe5xCV33RDlZ+7mpM1HJadZXOUXeNtsv2ymCe6OWRhUT9P7KOqsIM+RaVy+o+ryMt9wQG28NzWbjNgG/pFgf6d7Uj9+OMAkh2K2pf2UsUqywGP0TtSClm0gb2Uxai5GG0t+poIZHoV0Yw0+uKcFCfY/DYi5mqAxiLlEoClPB1qKIBzRdoXR6z/3Anubb7cNE48UQmL0facw+2gqF8YOrt9pfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4PP9Ewt1deV7hDO7UMcSOSL1B3xxcrqQdxPF4QSzhCY=; b=tanDH1oswcnlmdBVJJqd4LVXi33yiByzBFmmzy49okJ2IL8mBJIeDVup+f566uxrBUtMN+CVic8RYsNTiilJOq5jZhioW+mXRuXrDKiB4xoDy/xPW3sjmtjSyIXEqKz4Mb6vQRNaeXfmN23uYSCpiWt2oK2PeDafEO1l1wgAPWg= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=virtuozzo.com; From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, den@openvz.org, stefanha@redhat.com, mreitz@redhat.com, kwolf@redhat.com, jsnow@redhat.com, vsementsov@virtuozzo.com, eblake@redhat.com Subject: [PATCH v2 6/6] iotests: add parallels-read-bitmap test Date: Wed, 24 Feb 2021 13:47:07 +0300 Message-Id: <20210224104707.88430-7-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210224104707.88430-1-vsementsov@virtuozzo.com> References: <20210224104707.88430-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [185.215.60.244] X-ClientProxiedBy: HE1PR05CA0177.eurprd05.prod.outlook.com (2603:10a6:3:f8::25) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 434acfb2-9bd2-4fdf-ef21-08d8d8b19715 X-MS-TrafficTypeDiagnostic: AM6PR08MB4951: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:205; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +peFpWMrxaTlQ9OfIYJJiBpReXHguwYk78O2zr7T2p+3vAD2ZYpqGrXWj0ZW0oEW0h/WJveA0PupB/MvHCEdklwCqtaXTEL5lA3mQ/EziEOiYUVQ7b/+YqVkeiFQZsi7/inltc8tn/iMiIJK9oXjASj0cM4a3Z9+lX2BX9rJnIe9e41NxqR4J9zq40D8Bh/sw+xSCPVGjiWQGOYbf1+imfumcFAIKbrx93ykqXGpaWIAURowPYkxen7wULcuQhiZeNRfg7Q4KzNStS+bgdBDXZmjEcvjWEimVrSU0+5367eYUcV4/gfACQhGM/kinOttJLSC50S+LspQXmYAiGAetzrRvub7SAurbkOoxK6YIEXDxv3BQFOFSRQ6SS4L2r85PiDICV9ZsXEoa200fnZtpKjsEcsJPVicdXVCcze72K6zvp9wxVdZKwpkwUyqLL7hNPD7jm8jAQAm8svkcFRPn4/uKp1+RzPGmSgoqt17fJs1L4MEfaaCulC6UDjmqcaKWb550YP8lPDb4NV5+LOYPqURB+PtgBJpYywHQQNbsMTkN8LyBnOHzrQj3CzvQQwJ1PkZOa5gAyNMQoaB5BWhqAqY4zXywy8ATneMefMPrOB8pfIQRrFvXGTyfoPxikNTWRisCvREenaO3WVec6VUKXCMaEd1sNcqOIhBctC8E/DjhphuoFbRdnpUmFGk/bFg X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(39840400004)(136003)(376002)(366004)(396003)(186003)(956004)(2616005)(36756003)(66946007)(2906002)(8936002)(6916009)(26005)(8676002)(16526019)(5660300002)(316002)(52116002)(6506007)(86362001)(4326008)(6512007)(478600001)(6486002)(1076003)(66556008)(69590400012)(66476007)(6666004)(2004002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?f4zHHrY1iq4Kl8rPyXySewaia6vg+Lg0NGIj/ez+LgVZMhetvzUe5BvClt09?= =?us-ascii?Q?fblhGil7LUgauWFZpzstyl4vu3JmOzypCT1hKde4tFo/gbtW2hKQVQrKyyY3?= =?us-ascii?Q?t62IYBgh5Dsc/Ib0JdWNPY1MzbfeXQ8wNidrM2VnGZdQvjCQkxkYv/Imm+gp?= =?us-ascii?Q?GIBog6VVQjIupoQgCYtgHr276xF2aMiPG7QAT4to7zLn6OrCRY6wUGvuFNxe?= =?us-ascii?Q?/Bm4WJ6k7BImSUXTOTenMntiEtnai2LTYRW9/RRpZXMqmatNbJ9DzazFoB7j?= =?us-ascii?Q?rd4Yfizk1vh09T41U3W5VHY41QLC/M5/fge7c24+Oy9fB5zNoawlgJuM/RPf?= =?us-ascii?Q?ihYQiIR0GFvgIT7ImakzzqKu37JwW5UnXddQykDtV2JllCwhTAzAQxAnqfGI?= =?us-ascii?Q?7IafkBkXOH/GETj4LA+kc3D+rz8uql97d59IKCsUt89j3cQqaUgVHxfEZkIO?= =?us-ascii?Q?rI9SxBZfIe/9GiXyusyvZI4xfKfbRYPVVJK8wv9uKOKfqUjnurzFNHSxIjPM?= =?us-ascii?Q?frUen3qtX6O4XKxrSmx3ZUFYrIl8I1IzOamMtDObnh4gErTWaicnefkCRHTD?= =?us-ascii?Q?BGppqPHeGBOlddyhFWmmfszdCZuW2tfVXvTrksiXpC5suyEhh4mYricB9ptq?= =?us-ascii?Q?/DZZqRK5GyoDKkWblBY8MqUMhYy0DbbYT5zdeprLZfOyG9mNbZomYX9bLTnq?= =?us-ascii?Q?Evl2Wdvrby4Wp38iernThcaNc7lMfIl1ndtqbZgQJOLmod1WgzYMuNZZVxWB?= =?us-ascii?Q?PcrcQN3Mc5UZl4VdekaImJReXvZN4pQpayVrWgB6AuMReHwRaFuxRej4ACnF?= =?us-ascii?Q?KRLBCTAkYmwotFIRprUYi/UVkaUWHouyxfxCB3cWp79MiOIJwJEFabea1iQB?= =?us-ascii?Q?DGJxcjZ78kfeT/IWDvlOO73yGHqKPqLXcv8avQGEa0kAshts0zGZbiAfIkYE?= =?us-ascii?Q?QMKU9V+7CyAdBbvRduQSE1hXqlqEWO0pex7SDH4lpJVRmfetHovnZC/Q6fzE?= =?us-ascii?Q?ShXm4WqEMrcpQ2WHwY9xFXArd7A3UaSwhNZLBwRwo/znPpzG+AF4AA6b/zgv?= =?us-ascii?Q?077GUJM2xViTp7OfxPhm04CCuXr3MuzxKN/fhJzvUfE5Jw2p4235DxhE1AGj?= =?us-ascii?Q?UR9n1WllBtbSOttmfyfvXhov1825i7ZanwDvaqxAJVNWZbr48w9+5xJFEcMo?= =?us-ascii?Q?XTdITD80/HPP4+mBsKaKE9jyKvB6JNL0KHrt1WNKz4Gsq+mBm1Znhmp/9BBq?= =?us-ascii?Q?rtmfnUOIH7htJlC0iwSNobLsqoDp0zKaf6wNZ0NX0lcPeDOeOTg10A2sR9rO?= =?us-ascii?Q?rhc2ovUmqt5EJU1OOTzeqWvO?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 434acfb2-9bd2-4fdf-ef21-08d8d8b19715 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2021 10:47:33.1679 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bIHTHfVq2cZ58pW0qt5aI4pSyCF18rHPUq/t7g2iARm93Vhy19CVfuWw/ap7PFBbZYl03EU8t2qEyIyWfxkYPCssfijjzK8ASi100tm8jFo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4951 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=40.107.8.124; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @virtuozzo.com) Content-Type: text/plain; charset="utf-8" Test support for reading bitmap from parallels image format. parallels-with-bitmap.bz2 is generated on Virtuozzo by parallels-with-bitmap.sh Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Denis V. Lunev --- .../sample_images/parallels-with-bitmap.bz2 | Bin 0 -> 203 bytes .../sample_images/parallels-with-bitmap.sh | 51 ++++++++++++++++ .../qemu-iotests/tests/parallels-read-bitmap | 55 ++++++++++++++++++ .../tests/parallels-read-bitmap.out | 6 ++ 4 files changed, 112 insertions(+) create mode 100644 tests/qemu-iotests/sample_images/parallels-with-bitmap.= bz2 create mode 100755 tests/qemu-iotests/sample_images/parallels-with-bitmap.= sh create mode 100755 tests/qemu-iotests/tests/parallels-read-bitmap create mode 100644 tests/qemu-iotests/tests/parallels-read-bitmap.out diff --git a/tests/qemu-iotests/sample_images/parallels-with-bitmap.bz2 b/t= ests/qemu-iotests/sample_images/parallels-with-bitmap.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..54892fd4d01bf743d395bd4f3d8= 96494146ab5a9 GIT binary patch literal 203 zcmV;+05tzXT4*^jL0KkKS@=3D;0bpT+Hf7|^?KmNPH-R Fx`3oHQ9u9y literal 0 HcmV?d00001 diff --git a/tests/qemu-iotests/sample_images/parallels-with-bitmap.sh b/te= sts/qemu-iotests/sample_images/parallels-with-bitmap.sh new file mode 100755 index 0000000000..30615aa6bd --- /dev/null +++ b/tests/qemu-iotests/sample_images/parallels-with-bitmap.sh @@ -0,0 +1,51 @@ +#!/bin/bash +# +# Test parallels load bitmap +# +# Copyright (c) 2021 Virtuozzo International GmbH. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +CT=3Dparallels-with-bitmap-ct +DIR=3D$PWD/parallels-with-bitmap-dir +IMG=3D$DIR/root.hds +XML=3D$DIR/DiskDescriptor.xml +TARGET=3Dparallels-with-bitmap.bz2 + +rm -rf $DIR + +prlctl create $CT --vmtype ct +prlctl set $CT --device-add hdd --image $DIR --recreate --size 2G + +# cleanup the image +qemu-img create -f parallels $IMG 64G + +# create bitmap +prlctl backup $CT + +prlctl set $CT --device-del hdd1 +prlctl destroy $CT + +dev=3D$(ploop mount $XML | sed -n 's/^Adding delta dev=3D\(\/dev\/ploop[0-= 9]\+\).*/\1/p') +dd if=3D/dev/zero of=3D$dev bs=3D64K seek=3D5 count=3D2 oflag=3Ddirect +dd if=3D/dev/zero of=3D$dev bs=3D64K seek=3D30 count=3D1 oflag=3Ddirect +dd if=3D/dev/zero of=3D$dev bs=3D64K seek=3D10 count=3D3 oflag=3Ddirect +ploop umount $XML # bitmap name will be in the output + +bzip2 -z $IMG + +mv $IMG.bz2 $TARGET + +rm -rf $DIR diff --git a/tests/qemu-iotests/tests/parallels-read-bitmap b/tests/qemu-io= tests/tests/parallels-read-bitmap new file mode 100755 index 0000000000..af6b9c5db3 --- /dev/null +++ b/tests/qemu-iotests/tests/parallels-read-bitmap @@ -0,0 +1,55 @@ +#!/usr/bin/env python3 +# +# Test parallels load bitmap +# +# Copyright (c) 2021 Virtuozzo International GmbH. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +import json +import iotests +from iotests import qemu_nbd_popen, qemu_img_pipe, log, file_path + +iotests.script_initialize(supported_fmts=3D['parallels']) + +nbd_sock =3D file_path('nbd-sock', base_dir=3Diotests.sock_dir) +disk =3D iotests.file_path('disk') +bitmap =3D 'e4f2eed0-37fe-4539-b50b-85d2e7fd235f' +nbd_opts =3D f'driver=3Dnbd,server.type=3Dunix,server.path=3D{nbd_sock}' \ + f',x-dirty-bitmap=3Dqemu:dirty-bitmap:{bitmap}' + + +iotests.unarchive_sample_image('parallels-with-bitmap', disk) + + +with qemu_nbd_popen('--read-only', f'--socket=3D{nbd_sock}', + f'--bitmap=3D{bitmap}', '-f', iotests.imgfmt, disk): + out =3D qemu_img_pipe('map', '--output=3Djson', '--image-opts', nbd_op= ts) + chunks =3D json.loads(out) + cluster =3D 64 * 1024 + + log('dirty clusters (cluster size is 64K):') + for c in chunks: + assert c['start'] % cluster =3D=3D 0 + assert c['length'] % cluster =3D=3D 0 + if c['data']: + continue + + a =3D c['start'] // cluster + b =3D (c['start'] + c['length']) // cluster + if b - a > 1: + log(f'{a}-{b-1}') + else: + log(a) diff --git a/tests/qemu-iotests/tests/parallels-read-bitmap.out b/tests/qem= u-iotests/tests/parallels-read-bitmap.out new file mode 100644 index 0000000000..e8f6bc9e96 --- /dev/null +++ b/tests/qemu-iotests/tests/parallels-read-bitmap.out @@ -0,0 +1,6 @@ +Start NBD server +dirty clusters (cluster size is 64K): +5-6 +10-12 +30 +Kill NBD server --=20 2.29.2 From nobody Tue Nov 18 22:49:05 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass(p=quarantine dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1614851613; cv=pass; d=zohomail.com; s=zohoarc; b=RG6CsDdNr9+RwKkVJIxW73VkZ2gzn0QeJX09bMulYHI0c4b4a3eshYXhfuS26KASZ+t3lY2NqNw09eTetcEmZiPIpBYY4sLUeXYU855+ywFStST5xxPd/EHR7lTiFmqPnRx1C/1YPBjKOm1YGm0r3io7LW02klt4Oof09gE8jl4= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614851613; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rTWSwr1n5M1aZh7ONN/LXT9KOYx/2MlAdhSbOzcF4HU=; b=E1O60aTfFZZtBQotSNFFytPOecCBEsP7UKMqOVOQxi/WufA8onSr9OE+xhh9ReMTzAlxU3ACF5DNUHRgCvVBjz9nM3WmHwWKdtqOlF1ZHc/SmkYc79JcnwrGBICq7YzMRK/WClcHXhR3EN/BcLRkyop4sLfLA1ymNnmpHdnMDC8= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass header.from= (p=quarantine dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1614851613432144.38041396041433; Thu, 4 Mar 2021 01:53:33 -0800 (PST) Received: from localhost ([::1]:33762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHkfk-0001EJ-0r for importer@patchew.org; Thu, 04 Mar 2021 04:53:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHkeh-0000hM-Rw; Thu, 04 Mar 2021 04:52:27 -0500 Received: from mail-eopbgr30122.outbound.protection.outlook.com ([40.107.3.122]:30789 helo=EUR03-AM5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHkee-0007Uf-FW; Thu, 04 Mar 2021 04:52:26 -0500 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB3720.eurprd08.prod.outlook.com (2603:10a6:20b:8f::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.23; Thu, 4 Mar 2021 09:52:19 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::f1f0:6610:11f5:5e4a]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::f1f0:6610:11f5:5e4a%8]) with mapi id 15.20.3912.021; Thu, 4 Mar 2021 09:52:19 +0000 Received: from localhost.localdomain (185.215.60.246) by HE1PR0502CA0015.eurprd05.prod.outlook.com (2603:10a6:3:e3::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Thu, 4 Mar 2021 09:52:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IVLVnH1X6cp1oFT0aBclluHZ6phvSsx7rk+mBUlD/0a6AIoSHwqOV3C11Z0sgtkyWmjUgnDpogG+3b9iegcfCugTkPc5T/KEBQMQVfDSPFKsLgf43hogyapWTSIjlmRcQWzvVW2PxEHyuOe1Y/hCHeQcz/JXNTQzg1yVBNKMIpD645UeuwJbCjZlIqEcMUQ1t+Y2RKJ+mw9/BoT8yT1dTa10Te+MZAabpP1OyJj7xg5UcwQ1IC2kSaXeyPcGynrMeNxh/8m9cHvddAM2sOQvVT66YB/0mx5pErluEdH44QTOWOPNE001hA93OIjUkz9GY8T958lYfm7yp+sBGRWTKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rTWSwr1n5M1aZh7ONN/LXT9KOYx/2MlAdhSbOzcF4HU=; b=kSz6t8YWBArLjpEDegCkUIu5TOmvt9A3/arhTc5DtHc3lnCUVenAqFZIIcJcDq7ER85+HicVaikHmlE69wmv+OOjFJRBho78wtF6mLZ4yKMoAnM8Rfh9HfsZhX7KrCP7u4EWDKHfYkhvq1iXCrDKPFvw5HCjv4L5m7eec519nxkkAkQEZTCP7bqsiDRUejpgwhe1/8JRAeI03DGFNvypWHrvrTAb16ci3X3QUA6SsHPj4LVfJofjIKL/ajnQfcSWfyfoqVyJkZR7rDaL0WEOKIDFXLo3m1An+2qUngRxUmFK0qiXB2km1KVUtdeaLnKC90RZ+4gtFkQbFNJkiGbHHw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rTWSwr1n5M1aZh7ONN/LXT9KOYx/2MlAdhSbOzcF4HU=; b=oArCcGEpxlx7t93EWpRTK/WWucgkzQSL2b6oT71uLquYH0w+CfzP17UxR0/NeVPtJZlBqgjHO8Bayzy4pEVRV0bf3R7b4cJ/wfm03Ux31PbJwLKXC/hqSR5wOBsNdJ3Gncan7eNI6aJri+51wYHjrdqCq3KTmNZl406+eLT7mtM= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=virtuozzo.com; From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, den@openvz.org, stefanha@redhat.com, mreitz@redhat.com, kwolf@redhat.com, jsnow@redhat.com, vsementsov@virtuozzo.com, eblake@redhat.com Subject: [PATCH v2 7/6] MAINTAINERS: update parallels block driver Date: Thu, 4 Mar 2021 12:51:51 +0300 Message-Id: <20210304095151.19358-1-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210224104707.88430-1-vsementsov@virtuozzo.com> References: <20210224104707.88430-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-Originating-IP: [185.215.60.246] X-ClientProxiedBy: HE1PR0502CA0015.eurprd05.prod.outlook.com (2603:10a6:3:e3::25) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 187c4d2c-7545-49f5-c403-08d8def3335c X-MS-TrafficTypeDiagnostic: AM6PR08MB3720: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:265; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wx97PtA2oNrfrZqM7wfENuS5AeyrCB3QFHt6zoAppxw3c3NRoO9VdKYPHTFExr5lPKgyuODjFKTtcO0OGX8l/BbklteQ4Cu+pmZlO81cSAQcwWG5qLZgkCpDPzIMdv0JHAxySx5MPDhwBcjPIqIxRHSg1DEwLZm2qRGV68HIcnqZXRHVy7PVsFmf4XQ/8XgNtvo521F/b1pWFh0XuV6u/6PK308+8f9kdcZD7Kayf3PFd5G7eQfSkacxyI86PXzkS0I7LDY+GVmg1ezxHa03MbVMz0PKapo5maE8f17kfzNeEYq/DSc2ubwM3R5lqzz/OyUe8DaRJGCe5ghZyiu7N/OEGqX8Jcps03PpISPeLVEiEWKejDFcrh0Vf0d7DcZVH+S6PHqTJ46o/8toMy3ibwYgdEWCdWdF4WgRCGGi6Zo9nxTboKOkwAAsElmj7NPZl0ekngEV1c3OetsY1x2P231Wm/fHrX994HLFJPOsrGH1JfDYh98O2n9FDqvNwcXHds52xZys++bX+Zpdfpvfl7b4v1BtleTnW77OjAcuufbgEbRtHrpaaxhq44lm6hbV8hEgDMFQFRO638INg1FF0A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(396003)(39840400004)(376002)(366004)(66946007)(66556008)(2906002)(66476007)(52116002)(8936002)(478600001)(69590400012)(6506007)(83380400001)(316002)(8676002)(1076003)(6666004)(6486002)(6916009)(36756003)(26005)(2616005)(186003)(5660300002)(956004)(4744005)(4326008)(16526019)(6512007)(86362001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?ZimVaQZQJheyNZf7eyrHshygY1jkhv3yOfcIE0N17PAK+MMvuwq2NaT12/ey?= =?us-ascii?Q?ppuXV5enUzhUiebOq+KPn/yNTjjIc5hosi4abcVkOrCuBYNqDwHybNbLHNyz?= =?us-ascii?Q?KyzBR4NNri+RVoC6MTkmb6VG3DPABX/XPKSle3dT+PXz/iTN9fC/BjZwaUke?= =?us-ascii?Q?7jToVDB2AvkN3UR5B/bAINTvBv0j5+QTTQBDm+uDDpi3pfXw0ZU1kK0XIYao?= =?us-ascii?Q?I6mDHrcnjoo8YZhkbwzJIT7w8K+Qq4m9yu1ffdTlBLaJYLXssbK6hpyIYk5d?= =?us-ascii?Q?iUbivgcZGkOKkFj36DWB7LufBlffjX6d53NAPIEvIgIWp6HyF7V6hMEhgQ1l?= =?us-ascii?Q?p+y3ANgX8YYB7IN6Xd7ePP3zVHII6RkV7PXplMzMvJ40TPNmpOI5wTGdeDV8?= =?us-ascii?Q?GYQ2i4B4UC6a9vI+zPjNSLzTxHMztjSwBwvjOuIOiD9naTPaJ60QYqfYcH20?= =?us-ascii?Q?i4vkQ60VbsZG4OByqW/E+oCdsPpkkrUk7wRSR2EWzqYgt5GDHd6fmhWEN1sN?= =?us-ascii?Q?/tb/GtfB13owsx1XvATrxwC2Ns0H8/geuBkTYmSYEmUHl7tIIaBFIS1MktFS?= =?us-ascii?Q?c0x4n2bH7XHdhmDVR7LI/Zgzrgef43pxGAIRBN+oSgO3XdFvKWqcvOSAmKeY?= =?us-ascii?Q?0OKjkWr7T/NRndwVdx5VYrDo8JWW+1b5X353F/Sbkfbo5LpZD4afqgUz3c9I?= =?us-ascii?Q?XXJtAOmvsMhy6arbmHwxnRMRoUg7f9qvfTfI6f9V+NQm7QGkeAL3ryTscueU?= =?us-ascii?Q?Y1IGpiao2NQJzOttXRxlxbTFQwNi1bmbToTGnd0ykPu5jvwayr8cMb0Zb6mS?= =?us-ascii?Q?B/xL6RN8xmg6R+Dr1jdbu5fYBnhmoKsbAMzNhTT6xVObXBirCpvIIy6MS52Q?= =?us-ascii?Q?kq8Llxf+WDVSa3fDi0oayiaebsytfGIQhTvqY0f+jSTa/EMo3zk+xGv8BQVK?= =?us-ascii?Q?62/0xdCwBa5Ir8cmHtzGC9kYXMUkiY5hXkqCfqLCAZ9K2tt5XhwkqX63QPrd?= =?us-ascii?Q?2mhOsHclKM7PRmp5P0ABsxiZrlesfCMFMfsOg7U90B/gWKabc5+hjW7O8/EP?= =?us-ascii?Q?Er/f5q53AIKJ0VWxy40BB8IzzFdmFAOskve26aEo7H1qtTn4tNTsVSkt9Cbg?= =?us-ascii?Q?SSyQAAYplwuZibliS2fKQw/GgHOYI0cnLiPaABJNoe5LW0aVeSqcdpbKhHYO?= =?us-ascii?Q?jOC8jEsPI8PcaPnZttTfX5AtYbZpuiFhpMGD7R3IfjIv2rXbVkvmm/mSGVvv?= =?us-ascii?Q?4v2kKrh0hjBGVbQqCfi42QVd504yyNWF4+7RnujtGc2xGoOe/KmI0HoPi/ac?= =?us-ascii?Q?TUdax5azXCTJCIDC6kePrZrr?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 187c4d2c-7545-49f5-c403-08d8def3335c X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2021 09:52:19.6287 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3ZV2zMLd+4P/wmuIKadoi9Zx4cUqkT9FrBFCdXMtIrKckyum+q+/eWdhd7bIUbujzAGdDV3qdTxjV06/SzMeR+MoYiaZHrPCtjYYorIbAsY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3720 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=40.107.3.122; envelope-from=vsementsov@virtuozzo.com; helo=EUR03-AM5-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @virtuozzo.com) Content-Type: text/plain; charset="utf-8" Add new parallels-ext.c and myself as co-maintainer. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Denis V. Lunev --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9b2aa18e1f..92ba1fce5e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3117,9 +3117,11 @@ F: block/dmg.c parallels M: Stefan Hajnoczi M: Denis V. Lunev +M: Vladimir Sementsov-Ogievskiy L: qemu-block@nongnu.org S: Supported F: block/parallels.c +F: block/parallels-ext.c F: docs/interop/parallels.txt =20 qed --=20 2.29.2