From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591035187; cv=pass; d=zohomail.com; s=zohoarc; b=RLj/XYAW7qLVjVZA+6oGh+NequBcUYqAooRDAIxUhjFwP7tJjpxgql7pD83NDRvjszRnKyQMcfBbhUOO5KjZbTBEeE7EKJ6H5yzIvZ7btPfCuRlISBqNuHQ8DS8/0qa8G2ZuXOi7Ldw109WDA8lfj/zJimNbPuh1EBN70iTy460= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591035187; 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=k3AiKf4IdqJuJVI4XnnAK3JP1HTdcTOI5m8XjztJ7fQ=; b=SfyVXwaP0rM9E93Hdu0pcJcVMf+1qytDeLscEJ48fM/Mcfhf9BK+fY7y7pgzItJwp1GKol5hKlk7iK4KVbK+mJdSR6z22w/AYvtOseLqnHYthyQyXp9iL6w9hf1uYdeA5SXFD293NPDqAiIIeBin0t4c2mIqkupCiuZNE/2dIco= 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=none 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 1591035186760168.15065909916473; Mon, 1 Jun 2020 11:13:06 -0700 (PDT) Received: from localhost ([::1]:50718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfovp-0006s3-DX for importer@patchew.org; Mon, 01 Jun 2020 14:13:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfouR-0004nI-G2; Mon, 01 Jun 2020 14:11:39 -0400 Received: from mail-eopbgr70093.outbound.protection.outlook.com ([40.107.7.93]:39047 helo=EUR04-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 1jfouQ-00026c-OL; Mon, 01 Jun 2020 14:11:39 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:32 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:32 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h+t5KfniMETPi1ayaxrRUHTvCn3oeVKGzFXLT9RfYkFM7P22NV4VET2H+D/U+b8zMrU8KD1kJJN7M7C898GGKOuve252P3q/4crkEvGKzoG39/oGlRotijGQJdsBAp6f1oMre/OVOTu2HtXogYSqQ0r1kMRUe+RO3g7dRYp05kzPJDZLx9QTkCGC0GSIku3Q+W/mqVSWuhZMIUYG5kWNI7xc/qf+Rb+tMMI0gXXmLx//vRJr9SV3VACUyUW3av8h66qUqzfywyBJEMjE1hCCM6+c5uSX9fD359vAPhFHsOmE515MrN4d1fwZ0qPct6EnRchn1JVd5Ki/YeygiDT4WA== 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=k3AiKf4IdqJuJVI4XnnAK3JP1HTdcTOI5m8XjztJ7fQ=; b=fyMaa5xKDhhvJGKrR0+gQSLh7wOP0Dmg6oM+whyRbTQxyGquj9YmLq88xjwvwaVSkNkkav10Xl16KbxZCKQpvIjocUyNb6Ys5X3aqA0MKcd2rrxegOy4Wo3xsGmbKBdV3igvKjzxkSAezVIX/24odFBAHVY4gtZSksDom3RJJ0zGbuurhYTkcXFWVBLufNKIBX5xdEO1k7YgZLoUMr4qdxCPOBwM8Ur9uDic42bfeuYYuntDBbxEqM76NHOa/gU4ZLq1xyTBnbaNmSh+kAUZpG11dB0s0lCRumcMIFMIdmkdV3DQW1aKSN2qbHarujJ80n3ytFeutdSj0/AjwrJnBQ== 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=k3AiKf4IdqJuJVI4XnnAK3JP1HTdcTOI5m8XjztJ7fQ=; b=j1yyaMNW8gzVEiR6Z+dxy+N+RibYO/hYfhoA5GmrM7NwDeRdL3KwLtCb1QAttZNUqJ2di5w+oD1ins51bewx/Sr3tA2ThMgZUgS9hMg4A5UMLR1GzzCGQag9AJLfbCZfr5gpLSD8Jj/GAW9w0NL9ElLTUS464k0JMOmfWOJBADc= 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 Subject: [PATCH v2 01/20] block/block-copy: block_copy_dirty_clusters: fix failure check Date: Mon, 1 Jun 2020 21:10:59 +0300 Message-Id: <20200601181118.579-2-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0af8347d-9b2f-4c10-588b-08d806573688 X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +DehiY1v2FqMcSWtxbFUbISiCkOPQ2tyy8t6MmXH42glOcv/yG6alEBVHuiq9ys/XcLBodmDvgRfKyAGgoOLSimy8TTQGPE4HkXUtjQWsv23fr222E+kpKhXx0H91nZpra5JKqAHVoDAUs6F93ixEO7idbcJcjcgqBV5A+pshBxNFuaKif5i6VyIQ2KcYr4Rp5VGBa22nA8BNSrkFaD3mQHPbeoTS05MhqqtBYTvHUbnNXnPj42GrojQmV3h8ZPttZ/6OTnn5ijsp4tGpOYqHelwYbg6dKjkHBgYl7OVqGzxk7fDLRY/G48TSOmgALfnU15ha20vjEdh+ZKy0/I62DE94kROGMIkbKHf7ddmAV0BoSXmMcdp3N44UvLLQ/Q/0g7JSOfOXeIBMikcQI5nUil3sV9pZRbjIPtvI7ugPD8= 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(4744005)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007)(14143004); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: cCTlH+pPmBe/1fhuQQLHggSo28CJ15GUCjM42JoqO6wsHk6+Udkqam885LzPwJJ4OlQLaH/B/Ab1we5LFYphvpRLfW6Aj4FSWlKR73Vo4iwHNQjkxJF4ocXTmToNnmYVbCUtSNJx7LOFdMUMRxuTBB7W4utMEyHIkcaDZhqzS9Xjty6HVN8XF6DJAOAjUN+LjnREkQKxX/wIz+4QU8G0yUm0YIlc+Xg7mCKeoktlA91q8t3kVvjgIaV1pcPFPpMaXUhaeM0NIuCZVIB3+o6dz4nls/lOY7cjLEonm/WHpCfDw9sJYSc21bX2e5gc3AmaWDEDBUryxqlfVGgtx8vrhvNcVE4diCkSmKix4h84lV1z1Kr8jXVSpCUY82e7bD5b4Fjd07h5FvrAc4AQv0i5kYyrVSVqcUFbdhDiUPbSqKI86bF4S7VF9d6o1kpwfScLzjoRthUIn5KH4imCSA5x/cgChHelv/mnsuPVKIVIYzQ= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0af8347d-9b2f-4c10-588b-08d806573688 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:32.1743 (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: WiIPmIVVE/Xx/TVUop2ELuDa6VIu6FzIEQOugNf2914UZVFAtYoUGpo3k+vlIpmEDqKlRVHrbqP/2vrQL5WZdduC4NDKlP74coqx+MDIW3Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.93; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:32 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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" ret may be > 0 on success path at this point. Fix assertion, which may crash currently. Fixes: 4ce5dd3e9b5ee0fac18625860eb3727399ee965e Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-copy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/block-copy.c b/block/block-copy.c index bb8d0569f2..f7428a7c08 100644 --- a/block/block-copy.c +++ b/block/block-copy.c @@ -622,8 +622,10 @@ out: * block_copy_task_run. If it fails, it means some task already fa= iled * for real reason, let's return first failure. * Still, assert that we don't rewrite failure by success. + * + * Note: ret may be positive here because of block-status result. */ - assert(ret =3D=3D 0 || aio_task_pool_status(aio) < 0); + assert(ret >=3D 0 || aio_task_pool_status(aio) < 0); ret =3D aio_task_pool_status(aio); =20 aio_task_pool_free(aio); --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591035454; cv=pass; d=zohomail.com; s=zohoarc; b=J9KLh02GuLdxAw+ON66C//Ou0w7YDQwAf+v7elKlFFk/3U1qYpw843zJo4Dh5kbWhMU6MGPRmkB9YsM9B2lxCeSOdxi9yXZL0SYwY1TZ97iTnOVO+TUwSCYYDnIw4bTo25OQOjppAFA219nszCY7vEiUiLkRMKmESQ7bAfhFnac= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591035454; 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=AMBrNA+lx4UArfk+caCyxlVCfdti5JyL6rYl7fl72UY=; b=kX7Ek1kH9UEGaFk1+ZlsJMjzeyuxb90eDJJvnYwgHWJBypVcPujepnXipQ8meOlM84YK90qdirXRrr9bo4SIFshCesj2FqjhR2ufT3XCd+8gslFhc+1FVKh4LWF4xnGVIwgIfww54zJ/5XCqFVG6m7rrZdX81xH3lZyCj8IRPPA= 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=none 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 1591035454933424.4108683886285; Mon, 1 Jun 2020 11:17:34 -0700 (PDT) Received: from localhost ([::1]:34310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfp09-0003Pj-NH for importer@patchew.org; Mon, 01 Jun 2020 14:17:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfouS-0004oW-RJ; Mon, 01 Jun 2020 14:11:40 -0400 Received: from mail-eopbgr70093.outbound.protection.outlook.com ([40.107.7.93]:39047 helo=EUR04-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 1jfouS-00026c-35; Mon, 01 Jun 2020 14:11:40 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:33 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:33 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZePe3+Jn3/Sd6lXfvMJI1ZR/4b8umcJCeKpjILARFjayhxB2Mre11ZKyTYkiImpvINaxOadGd6mrYjQF4hvnagq49dncfuFwLyNrWxeRnNl4Hw198tOHtfDKtM5uYVHVQ7yaCT07kLhelb/89kPu6ycCP1cF+NYmraEhl8rd22ApL4+ymShxFGL+RWQS1RvFEvdDOnlc2YUV7VlIfTRis3Ff/k8RLjSXxcHsBB/P/6xFtuKnnp7udwzlpbCwEeu79BLPso0YkHrfG1+ma5P7WesqZ14RdHd7eBeXxX3iG6X99bxLv2pJ0Qwcc8OnW91cJLAinR3B5MVVD98oIGd0EQ== 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=AMBrNA+lx4UArfk+caCyxlVCfdti5JyL6rYl7fl72UY=; b=DQaimtRssIoID+9ZFADzgd85FZ3u3NECZIYIzOmUoau+0aRYVXavaRoLikRu87tcNeOJdF3oeQnLhasvoc3a4CaIBU/hMdKKmWnLDDbkgGtdBTTcbLPZBRxY2ffanJjlNyT441rIkHK6WNVtXf9xnkx8u7vfEJ4xUbcJya5lxbeUs898hXZptZkOaLIFOf6NKon/ouKDBvZK1DGDvy0VjnFUjS5iW+4FUwnzVHonGp/bND0zLAlebzATdXGdknhy68Gejsd8oT7BR/vSzpzUiDrR1u2QxHVr5SJWrkuGu3mDwArK6+vb6Kja++X/wt96qKhbsRRkVFHIV1I33k5Y4Q== 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=AMBrNA+lx4UArfk+caCyxlVCfdti5JyL6rYl7fl72UY=; b=ZudlbFqysrTubdzniOpfIGlYuC1Tadqjz6lQdnQK8lm0YLYsDUIqezGc/EfenSDtVN1VzAqrfupKCTjQAa8rmHweiBp1PuofvbBZE0sFJSq6zElLTS5zBCgG/hGX9RUqcOxhF48eKSoq4MZc191AztnMwhRY/7uuzXePD5sjOuc= 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 Subject: [PATCH v2 02/20] iotests: 129 don't check backup "busy" Date: Mon, 1 Jun 2020 21:11:00 +0300 Message-Id: <20200601181118.579-3-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e3ce34ca-387b-4932-c5ac-08d806573716 X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:494; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zb7td78y2udOu23JaapOx9id4F4ASmqRs4Sx4f3fym66/DL/uQuvFVtRqKfS7FcO/DH3qy85uwzn0Ytjik/AmM48Ymz+c4YrEKEHkIrKxG6Vg10d/jb3Iw+DqXL4+NxIAcBJ4bCiAr/0IuSUJXNqgtsF8oX7go7XqVcDylH/w5VwhQp8UFI1yyPHnzrMkMk/rpS22MvGz6OoIiiGIDVbpqQZ82yKBkBY2c5/kKWCd6Aq6Y5RSY+9oaqa0dvJQ2fzrLGiyA8GYbhfpzRaLEyoJWQxUiQzypj4zwTGhwGIWInI3VCBONotRWstytWNpuA/Ljy52pLYTlRyogVIk6Bbh7LSjhKtycrHElGln6IcFRng+rRWSCPiyxEWrDJhIfZ9 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(4744005)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: d6YPWf5r6MTQwd+pbxCSggVIB5tFWi3Bb8JmKBO8vyM8MHPq0vvUHu9QoAtk34h+qGMtOvJ37H56ycz6h4Tku8WV9TzdqIt6FtxrjuU5cDmN3vA5qY5DFTCkk3tvOkHvRdR9c7UcnYi/e4j7ubVYTxeB+VW2E4yAD2kWS9KFTVHDEN6zeWA88ukY2jlHOmdvqzl7eXk+/OoJhFDzHU4DdiWRfVXfIxgKxHGB+URPi5MEa0fre74oQgQyk0bRkmV/6DY2rd4k+4mfAEA7koxeUbZYphFLFRSqsF/US6HW1KMQmlnc4uMfx9lqxibc/lx3sfODsrSueDeu8NR0tgKIbU0wFp5wM1rxZ75LBLPqcPgL/AR54vk08D2lnA/V130ln1Sy/GT04iZ1QhCnyjpn1IsZXhf+GdGJPc7VAqokwgvW1fXP+wTd3d8qsf30NK1O5GHLhWwURALI22IN3TW2q3H1cNfgFGT6umMU4RkqEwo= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e3ce34ca-387b-4932-c5ac-08d806573716 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:33.0320 (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: v9w2OY+OMm0k17xOnuZYuZfZlaL0QqjLrJSXfATFiiWtOTKV4gob9PsecL9Dy9apyPw63Ypfo09jPTb+EdaiY8BNnbwDYVbD2MUIG8R3oFQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.93; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:32 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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" Busy is racy, job has it's "pause-points" when it's not busy. Drop this check. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/129 | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129 index b0da4a5541..4db5eca441 100755 --- a/tests/qemu-iotests/129 +++ b/tests/qemu-iotests/129 @@ -66,7 +66,6 @@ class TestStopWithBlockJob(iotests.QMPTestCase): result =3D self.vm.qmp("stop") self.assert_qmp(result, 'return', {}) result =3D self.vm.qmp("query-block-jobs") - self.assert_qmp(result, 'return[0]/busy', True) self.assert_qmp(result, 'return[0]/ready', False) =20 def test_drive_mirror(self): --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=virtuozzo.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591035188761302.4765676194951; Mon, 1 Jun 2020 11:13:08 -0700 (PDT) Received: from localhost ([::1]:50856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfovr-0006vL-9a for importer@patchew.org; Mon, 01 Jun 2020 14:13:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfouV-0004uP-9M; Mon, 01 Jun 2020 14:11:43 -0400 Received: from mail-eopbgr70117.outbound.protection.outlook.com ([40.107.7.117]:10211 helo=EUR04-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 1jfouU-00027N-1d; Mon, 01 Jun 2020 14:11:42 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:33 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:33 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Drcg7dPdbGt8HSQ8v3Dt3JtW3pTv1XnWMMH4eu0lBx2wjcWwtj4klf3SnwSbAU5HIGQmMF/DxASafxsQyJjLUyz5eFE3/jmHVDjEZBoBuI1nWd7EjKt3f9yLM//WvK0fWKht+4+6Ql10nM42q5Bb+6XfS8LgZu0sUa2g00SNPsPawc8G41FekUzvzJQhEFRug0TrzLPH3hpEbBUwEnIx1/50WJGQfX6x5cBe/8h4A63WI7hhs+fcIqa7J5OYJdJUWsUoW+G32bcfW7p3spt5NPk0Z1disvU3VaKqc/4Lh+VndR5VIcjjRUKR/j3aT7S3aoLqI1QbzLQQw5AGonXLvA== 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=jtFOXYMWik8OBbtSOj0UkU8OwmPksuL15XJfxD/Vcts=; b=d4jBWmBvuvk2Kbxsz+SmWkq5rIGasn7v1HfKmc/K6Y9lv7/flpnrQ7yHQ+z7uFTZQKS639FvpGebotnu66fdv+5KrNlOjzxTaZO1CrNSkmNigvsVh2GfAdo+xq0ZjsEMn8ekU7dYJATPHL+S+0dD9v4jYuy0+OAGVwW6+h7/WF1/go8Zlzx7zUTzt7lt+piPrKcbD1dyOE6ogekI22nLqpQvyNjizgtGvcZHnVqmqfcLNEPNsfX0SKFGF6rwblV/eLOesJtkt/FROwTqoTgs7YAger1jI39h8CWkMXVlT3w7VNaxDI2uRGl+3CBuJr8iDz9PeLPa4buxmGaHm/xpMA== 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=jtFOXYMWik8OBbtSOj0UkU8OwmPksuL15XJfxD/Vcts=; b=EMfKiinn4OzHfGUqaEAW77Rp3OD9UngZQb11x/JP2ZiCHPE9mmJPvPgeasZFF84PbX8k+syZDaHrIEkhCxfzN0rVyFKXkenEgOJjDzLvsu5ZsFzkkWI37m3B/nbdDMszgemuw4aqZcd7NoN6+pnwAENviK/GohvuhF/FyrkHAck= 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 Subject: [PATCH v2 03/20] qapi: backup: add x-use-copy-range parameter Date: Mon, 1 Jun 2020 21:11:01 +0300 Message-Id: <20200601181118.579-4-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 37067665-4681-47b5-326a-08d806573799 X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:199; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0/dEFUJJ6emTw15eEE7+StUSUyQJo5DLm6fLFclsUALs9KsPuIr4yxyOFIHJcf55K5fCHtPqqGt057VdSlZduKJDfAM+SuE+eZdpfUrt+616VHh5GddhzAG24fYNGs2Uvx57Vukkq4nF5v2rDqc2aXsHzOmLzMSi9KENZab7K4t3YIg+tLmT5nSuC76qUUj1raVOdQeblBoQO2F3g11qELR3HCe2BoNMhKIGguQleHjJZx5yVFrQYKvS4/OhTdtLR82jcebCKl4cJKPGGRryXnneDprlzGikF6g8xdA5Noa1CEYCt6jv46nDx9zId/jGvaFDxBsO3pNHJZ6Rwapw/x3Oxm80bpVi1awxfBTHTxiTfNnHbJR3LV66LwL9ZJoM 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: Ctm9wUwBWwfl8lmrWDMKYnraOjPO9Ou3rhJikNNa5VhpJATn3vG4dqRpKeNUr73Osbj1YxE93aFmTYjwgLY2qTH0Tct8+4dIbtokH6f2MSk9pPA+MoA9eA6LKpti7A/Iy9hDp6dI+kgTbvpqbgDxgxXRT3MI5/r7H2F4h3LvEbo4AJtuuhGGCtMjepOJDu/SwEf78+htcAyaR92D9CAjn2esLrood3RU2QymIgZjJ6QZ0/s3cTut/WYf2Wshu0FjWGd/uzhgLu8RO/lhI3eWyry4W/b7TPOJri2hSXYMZf7+QNjAVbWWP0kvTxT1MYnvWGKu6uvcQjeKoDN0hjC0L6V2G2qzzXWjDnRsRgPdHs8drdZUattF1DWcThtn01+TFT/10KGyUl7qoWW9EFdSYz41Q9QLflbmtxePhskh2uAMdbPbpRYpg3qpCAbA/NiOW4CJrEgz7k6k8mQ2dsszZvLLmEUdHsgIpmRjh0xSKTA= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 37067665-4681-47b5-326a-08d806573799 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:33.8803 (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: wRWmHMeweFNCuGDje/VvCsF2OWkKvwKD0GduRvOjEWRvQBEy1Rsevtur3R93NBdTk9qhiSRuBnYDEWqW2GzhHfwLuZHeR/jSl9RnmMpOHoQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.117; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:40 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Computed bodyhash is different from the expected one) Content-Type: text/plain; charset="utf-8" Add parameter to enable/disable copy_range. Keep current default for now (enabled). Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 4 +++- block/backup-top.h | 1 + include/block/block-copy.h | 2 +- include/block/block_int.h | 1 + block/backup-top.c | 4 +++- block/backup.c | 4 +++- block/block-copy.c | 4 ++-- block/replication.c | 1 + blockdev.c | 5 +++++ 9 files changed, 20 insertions(+), 6 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 6fbacddab2..0c7600e4ec 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1405,6 +1405,8 @@ # above node specified by @drive. If this option is not= given, # a node name is autogenerated. (Since: 4.2) # +# @x-use-copy-range: use copy offloading if possible. Default true. (Since= 5.1) +# # Note: @on-source-error and @on-target-error only affect background # I/O. If an error occurs during a guest write request, the device's # rerror/werror actions will be used. @@ -1419,7 +1421,7 @@ '*on-source-error': 'BlockdevOnError', '*on-target-error': 'BlockdevOnError', '*auto-finalize': 'bool', '*auto-dismiss': 'bool', - '*filter-node-name': 'str' } } + '*filter-node-name': 'str', '*x-use-copy-range': 'bool' } } =20 ## # @DriveBackup: diff --git a/block/backup-top.h b/block/backup-top.h index e5cabfa197..2d74a976d8 100644 --- a/block/backup-top.h +++ b/block/backup-top.h @@ -33,6 +33,7 @@ BlockDriverState *bdrv_backup_top_append(BlockDriverState= *source, BlockDriverState *target, const char *filter_node_name, uint64_t cluster_size, + bool use_copy_range, BdrvRequestFlags write_flags, BlockCopyState **bcs, Error **errp); diff --git a/include/block/block-copy.h b/include/block/block-copy.h index aac85e1488..6397505f30 100644 --- a/include/block/block-copy.h +++ b/include/block/block-copy.h @@ -22,7 +22,7 @@ typedef void (*ProgressBytesCallbackFunc)(int64_t bytes, = void *opaque); typedef struct BlockCopyState BlockCopyState; =20 BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target, - int64_t cluster_size, + int64_t cluster_size, bool use_copy_r= ange, BdrvRequestFlags write_flags, Error **errp); =20 diff --git a/include/block/block_int.h b/include/block/block_int.h index 791de6a59c..93b9b3bdc0 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -1225,6 +1225,7 @@ BlockJob *backup_job_create(const char *job_id, Block= DriverState *bs, BitmapSyncMode bitmap_mode, bool compress, const char *filter_node_name, + bool use_copy_range, BlockdevOnError on_source_error, BlockdevOnError on_target_error, int creation_flags, diff --git a/block/backup-top.c b/block/backup-top.c index af2f20f346..0a09544c76 100644 --- a/block/backup-top.c +++ b/block/backup-top.c @@ -188,6 +188,7 @@ BlockDriverState *bdrv_backup_top_append(BlockDriverSta= te *source, BlockDriverState *target, const char *filter_node_name, uint64_t cluster_size, + bool use_copy_range, BdrvRequestFlags write_flags, BlockCopyState **bcs, Error **errp) @@ -246,7 +247,8 @@ BlockDriverState *bdrv_backup_top_append(BlockDriverSta= te *source, =20 state->cluster_size =3D cluster_size; state->bcs =3D block_copy_state_new(top->backing, state->target, - cluster_size, write_flags, &local_er= r); + cluster_size, use_copy_range, + write_flags, &local_err); if (local_err) { error_prepend(&local_err, "Cannot create block-copy-state: "); goto fail; diff --git a/block/backup.c b/block/backup.c index 4f13bb20a5..76847b4daf 100644 --- a/block/backup.c +++ b/block/backup.c @@ -334,6 +334,7 @@ BlockJob *backup_job_create(const char *job_id, BlockDr= iverState *bs, BitmapSyncMode bitmap_mode, bool compress, const char *filter_node_name, + bool use_copy_range, BlockdevOnError on_source_error, BlockdevOnError on_target_error, int creation_flags, @@ -440,7 +441,8 @@ BlockJob *backup_job_create(const char *job_id, BlockDr= iverState *bs, (compress ? BDRV_REQ_WRITE_COMPRESSED : 0), =20 backup_top =3D bdrv_backup_top_append(bs, target, filter_node_name, - cluster_size, write_flags, &bcs, e= rrp); + cluster_size, use_copy_range, + write_flags, &bcs, errp); if (!backup_top) { goto error; } diff --git a/block/block-copy.c b/block/block-copy.c index f7428a7c08..43a018d190 100644 --- a/block/block-copy.c +++ b/block/block-copy.c @@ -215,7 +215,7 @@ static uint32_t block_copy_max_transfer(BdrvChild *sour= ce, BdrvChild *target) } =20 BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target, - int64_t cluster_size, + int64_t cluster_size, bool use_copy_r= ange, BdrvRequestFlags write_flags, Error *= *errp) { BlockCopyState *s; @@ -257,7 +257,7 @@ BlockCopyState *block_copy_state_new(BdrvChild *source,= BdrvChild *target, * We enable copy-range, but keep small copy_size, until first * successful copy_range (look at block_copy_do_copy). */ - s->use_copy_range =3D true; + s->use_copy_range =3D use_copy_range; s->copy_size =3D MAX(s->cluster_size, BLOCK_COPY_MAX_BUFFER); } =20 diff --git a/block/replication.c b/block/replication.c index ccf7b78160..25987eab0f 100644 --- a/block/replication.c +++ b/block/replication.c @@ -563,6 +563,7 @@ static void replication_start(ReplicationState *rs, Rep= licationMode mode, s->backup_job =3D backup_job_create( NULL, s->secondary_disk->bs, s->hidden_dis= k->bs, 0, MIRROR_SYNC_MODE_NONE, NULL, 0, false, = NULL, + true, BLOCKDEV_ON_ERROR_REPORT, BLOCKDEV_ON_ERROR_REPORT, JOB_INTERNAL, backup_job_completed, bs, NULL, &local_err= ); diff --git a/blockdev.c b/blockdev.c index 72df193ca7..28145afe7d 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2813,10 +2813,15 @@ static BlockJob *do_backup_common(BackupCommon *bac= kup, job_flags |=3D JOB_MANUAL_DISMISS; } =20 + if (!backup->has_x_use_copy_range) { + backup->x_use_copy_range =3D true; + } + job =3D backup_job_create(backup->job_id, bs, target_bs, backup->speed, backup->sync, bmap, backup->bitmap_mode, backup->compress, backup->filter_node_name, + backup->x_use_copy_range, backup->on_source_error, backup->on_target_error, job_flags, NULL, NULL, txn, errp); --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591035185; cv=pass; d=zohomail.com; s=zohoarc; b=RLD00T0W1cYg0YL8nm4XADXQglseg52vB6lvMHviIo5sYkj9X0KUkcVdq3mEQAvDDBJynE6pVf1OLyJbi+nD1oFAHc0nZhdpRo44w2cIgEmdSK43bzW7s4T53v1D2hR1a5Wz2y3XAHjnDZ++ujl/6ViJL4UqfwB9i2zoGrlVnAY= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591035185; 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=ewZPhdTzYAYsj3v4A0UfZ1v0/DQIlT77yyMtWLAgvvM=; b=JZwrEQqp5i4bE8NRYDqvfP2/MdBo0bz8J0YpEe3sK3ovSXKMEM3yqRbj9de80o0Sd/dy3TIm8uuCUrbldtXKd5NInvKUTpJ9ndxKJSJfY52UqAnzzrCFx5nfZNJWG1ab4P8eNhjA9LYY2jKUajZGrg6v4/m9JETk3o3Mf48p6nE= 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=none 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 1591035184632616.8692652250968; Mon, 1 Jun 2020 11:13:04 -0700 (PDT) Received: from localhost ([::1]:50474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfovm-0006ko-Rm for importer@patchew.org; Mon, 01 Jun 2020 14:13:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfouU-0004sQ-Jh; Mon, 01 Jun 2020 14:11:42 -0400 Received: from mail-eopbgr70093.outbound.protection.outlook.com ([40.107.7.93]:39047 helo=EUR04-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 1jfouT-00026c-Gd; Mon, 01 Jun 2020 14:11:42 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:34 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:34 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PDGspwZjK9yk20+QqaI8W6Xl0DjFJupx3w9yfjtZESibOZGJ0+tNT2PXw3bF0b5UZBOhCV9+0N9obskuMOwwzf/W67Vx1x6gnH8EfxXLWaglgFz6uuKtED/hCcjQzffa8uxmR0NNObPvThHuF4rYXO+2mBQmR9hKaNVnNKXSMQ9xbIv3QyNNXAk07j+x2qK4G4nsR57z01qmGEcgG8aKsENbjTXg13Ad7eK4voj34rCkQDNkoHT/BxE9KdIa1NexZoMQLj1XMet0OyvAYSHqO0+2W5XEXf6Rqo8eFSXeQOiIBZKpvzpJ++eEpKeg1W/gFUhyHugUy6CDrTlaNVJ4lg== 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=ewZPhdTzYAYsj3v4A0UfZ1v0/DQIlT77yyMtWLAgvvM=; b=EbZgJSpqTdqeMoqzm4q/2l9ctao4kjU4ncjWPTQ63NFWMtt+Mc8oSPJmp0zutv6r1cESbtNjwk7XNIucf7s1/C8pYer8OpTPFG5d47vEwpfmfpRX6IxbG2bIF5zC0Msb5Gfp09PK6s/buBqfIsnrfR6De5bI6qyua7uCo7nOyUQJcD9aWtq3xdTrx/2TTbskZNOdlrt0cdw+s4Tct2lvM78rRQ3fhUlhByj6kpEqlGfodeBS8Z9KEPJBlklrtd0ZC+X9uDnSJlwfgz/pH+bXl7I8Y/9DfoQixgn25jGS/bhBHjWr2wNmewtyUETYWRPZL33vtsabPIXqP3dyFzltqA== 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=ewZPhdTzYAYsj3v4A0UfZ1v0/DQIlT77yyMtWLAgvvM=; b=gTs1973wsJHBO2z3CNA1EvdpnJfCovF+Gow703Zqqi6/l9vCPQdYAquG4vH3Z90f/SmenX6WbvEr2Yeycktq0YBlpmAkRSPakL+h+0AG3XVUy8SrEr+SAf37xP4WYeWGtA/3F818C64hxACWVk1xTisJknFxLfYhRDGRIOs1dG8= 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 Subject: [PATCH v2 04/20] block/block-copy: More explicit call_state Date: Mon, 1 Jun 2020 21:11:02 +0300 Message-Id: <20200601181118.579-5-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a183cf8d-18db-453a-71c7-08d80657381d X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:751; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W/5FupgJ3nu8xGQXZP+t007aeLPMdsAjUh/BhmgiFekU+5nKRibI+5jOhIWtaNf8n51qhY69T8TrlIN9V7Z/u+mUbF6y0bUjSBN1FIj887slDjqb7EGUc/Kc+sbUjWifmOguRQvzzQgEkuBa/zfewm0UOrMfyqTxAlwds4hemuI+tvEhpHg7M3d53yJ9neCAg85WMzQsyCCnROVDiwo8muGUahT4jJnv+glJyQu7jtxpMpsfn7a0S/TQ2aqX4hSISGPZgAuf1dk5FERcZSWy5O1P1qagZirs9cIsE3mNwtEvhdzXBZfIeOzDGBcdfs0hzJgMJHlI3ilWD9Ul9OzEVYJUVsaT3wOWUxXo+QOEemPbkptNENWU1sA4mcF6k6gl 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: CCTiJtn2LvgRnMZrcQfnWh9+odnefP0EGq7sjdZ6NNRt5Qi0DH/aF1iey+rRhwv0I9UQh0qfwZYELuAyi/AOX2Z8GlFQ/guOWUPCHzGBGfiek3mVX5zqzPw+G60xpAb7NncIMgVJEq6lcg7sQ4o0wcbZfv1iLB6esL6XQ4MifWWoiCkBdAfRBu/nIeemFY2uL+ykbyLSebFzPCaNm35uytmX70F+/cn/E/HT4NdYqKAqocVmYxk+fRj9dw4wIk6Ta3YMxOD8owHZm/DN5vaUbDOeFxHfXYujoTa+nrnnK8x0dMgMvnuS9Y6zSyh0lvuw9ualcwVmbAM+RBOwu3dov29zOBVGcjgncp3GAqrfJGM9/DFkmBi7/CysMOPKhtfc/CayvD9NqSw5TZGEFZ1ZxpD7+tTpFfIpNl58yYwQNjCB2LpDmYQ0QGyZFkaTygR6UfhhWlXlw4MiipCAoM6YHCQ7Ua9T9zD1wAqL9jURRHg= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a183cf8d-18db-453a-71c7-08d80657381d X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:34.7669 (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: DeutApwlXQd3qpCh4Eli55iWUOQ6GfNZ4Jq86GZKruAbi2fB1DqoDBrpBxXqY9AGsfwrOi3tdHycNY6i8TQcSTXqrpRVOSjtFz/6U+6xmn0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.93; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:32 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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" Refactor common path to use BlockCopyCallState pointer as parameter, to prepare it for use in asynchronous block-copy (at least, we'll need to run block-copy in a coroutine, passing the whole parameters as one pointer). Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/block-copy.c | 51 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/block/block-copy.c b/block/block-copy.c index 43a018d190..75882a094c 100644 --- a/block/block-copy.c +++ b/block/block-copy.c @@ -30,7 +30,15 @@ static coroutine_fn int block_copy_task_entry(AioTask *task); =20 typedef struct BlockCopyCallState { + /* IN parameters */ + BlockCopyState *s; + int64_t offset; + int64_t bytes; + + /* State */ bool failed; + + /* OUT parameters */ bool error_is_read; } BlockCopyCallState; =20 @@ -541,15 +549,17 @@ int64_t block_copy_reset_unallocated(BlockCopyState *= s, * Returns 1 if dirty clusters found and successfully copied, 0 if no dirty * clusters found and -errno on failure. */ -static int coroutine_fn block_copy_dirty_clusters(BlockCopyState *s, - int64_t offset, int64_t = bytes, - bool *error_is_read) +static int coroutine_fn +block_copy_dirty_clusters(BlockCopyCallState *call_state) { + BlockCopyState *s =3D call_state->s; + int64_t offset =3D call_state->offset; + int64_t bytes =3D call_state->bytes; + int ret =3D 0; bool found_dirty =3D false; int64_t end =3D offset + bytes; AioTaskPool *aio =3D NULL; - BlockCopyCallState call_state =3D {false, false}; =20 /* * block_copy() user is responsible for keeping source and target in s= ame @@ -565,7 +575,7 @@ static int coroutine_fn block_copy_dirty_clusters(Block= CopyState *s, BlockCopyTask *task; int64_t status_bytes; =20 - task =3D block_copy_task_create(s, &call_state, offset, bytes); + task =3D block_copy_task_create(s, call_state, offset, bytes); if (!task) { /* No more dirty bits in the bitmap */ trace_block_copy_skip_range(s, offset, bytes); @@ -630,15 +640,12 @@ out: =20 aio_task_pool_free(aio); } - if (error_is_read && ret < 0) { - *error_is_read =3D call_state.error_is_read; - } =20 return ret < 0 ? ret : found_dirty; } =20 /* - * block_copy + * block_copy_common * * Copy requested region, accordingly to dirty bitmap. * Collaborate with parallel block_copy requests: if they succeed it will = help @@ -646,16 +653,16 @@ out: * it means that some I/O operation failed in context of _this_ block_copy= call, * not some parallel operation. */ -int coroutine_fn block_copy(BlockCopyState *s, int64_t offset, int64_t byt= es, - bool *error_is_read) +static int coroutine_fn block_copy_common(BlockCopyCallState *call_state) { int ret; =20 do { - ret =3D block_copy_dirty_clusters(s, offset, bytes, error_is_read); + ret =3D block_copy_dirty_clusters(call_state); =20 if (ret =3D=3D 0) { - ret =3D block_copy_wait_one(s, offset, bytes); + ret =3D block_copy_wait_one(call_state->s, call_state->offset, + call_state->bytes); } =20 /* @@ -672,6 +679,24 @@ int coroutine_fn block_copy(BlockCopyState *s, int64_t= offset, int64_t bytes, return ret; } =20 +int coroutine_fn block_copy(BlockCopyState *s, int64_t start, int64_t byte= s, + bool *error_is_read) +{ + BlockCopyCallState call_state =3D { + .s =3D s, + .offset =3D start, + .bytes =3D bytes, + }; + + int ret =3D block_copy_common(&call_state); + + if (error_is_read && ret < 0) { + *error_is_read =3D call_state.error_is_read; + } + + return ret; +} + BdrvDirtyBitmap *block_copy_dirty_bitmap(BlockCopyState *s) { return s->copy_bitmap; --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591035351; cv=pass; d=zohomail.com; s=zohoarc; b=GsnVrZcIgKlBRfGPjD0W5dwpT1IeRRULoVXRra+Kf3sR2aqB7PctyNvoJJqB28Jcm8DOXrUBc9BssVgsjrrFHIgLNFaRqzE+M6A8faNCNUT8+rJSTxTqFJtKqViVLrVHRANU82ZAEDw5JRRlVGglfcZhKcUtdzJK1O4vFBUFvAw= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591035351; 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=B7Eoq722JIj/34+zavBcv7aOy9uvQayxsFq2nYvNM6M=; b=OLFiw9MgyPusBfdt/1GScxz7HtEGiMmPqrxIW2DKru1/SGwhgYwkNrLUx2B4pPmVrUpnnbWYAuYlJb4mQvsFQ52L7KVkr1PI0IIhuYyKOD5V90iA0F1FfCq8EKwkP5cky1hugPBUJjqS+VsJE7Bukmqx7e5TZlsBBayJ9T6WXYk= 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=none 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 1591035351781104.67207147138345; Mon, 1 Jun 2020 11:15:51 -0700 (PDT) Received: from localhost ([::1]:59022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfoyU-0001tG-Gf for importer@patchew.org; Mon, 01 Jun 2020 14:15:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37686) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfouW-0004ws-Bh; Mon, 01 Jun 2020 14:11:44 -0400 Received: from mail-eopbgr70093.outbound.protection.outlook.com ([40.107.7.93]:39047 helo=EUR04-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 1jfouV-00026c-C9; Mon, 01 Jun 2020 14:11:44 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:35 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:35 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QsEqA4FZmwCbOz9Cq9bcRo1VZ4tlGjWPQ+6k9sRZ3VhUg54Mp6tIe/SWX9ySoaAdKKGo8JsW84OQg2+KnZumqp9RfRGIXjcopNvtIrTEmh+Qv9Vf776a3+vynMdCxMJ7DZkAjxExCanlkfO7j2rm2trYFI8nNbJ9xcHNIhRV40IAM2olT73S2KywePzfS3zzvm0N8hCOPu3eQaZpvPW90hzbuCIGPsxO+c/7WNkZhgEUQYfnt1lw/Fy79RU83LxYQty3PlHkpBXbD3DH4eK/ID+3SPEG/YXRFE/K8yLJvPNBxoyVSXxED91b+W9t6AHdLYnIrOD4+8awZku59nIR8Q== 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=B7Eoq722JIj/34+zavBcv7aOy9uvQayxsFq2nYvNM6M=; b=moxEfACG2rwHgTNgcIUz073/Qf+mK4XVZZ/J8ujARy3u7c0R8/SHYfw54erj6HB8hPrQSt+Ot8V6ZT2lWk6SL6yqDNGBXlMuFoYW6U1f9GgRJE4AYZuLY5aqNIbjqJacATdcXX+VWKzR63QTfavqH84PTs8RpYvz39vnvNBTuo8qkA5xU06vi4kSmR2wIj+YM6oaMIbynKwhsklEP1fFjpnKSOA9+VToh/erMSlZ/svB29Lss8BL6dLb9II1XirJq1FooHJpB3gSiqnCVDCFnZDQxBg9MBor8k1DWQ9FqoP0rDKyPmZzh4ruR/OnDgiiXVqR8UMMvlCSrvJf3cI2HQ== 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=B7Eoq722JIj/34+zavBcv7aOy9uvQayxsFq2nYvNM6M=; b=co2Ut2upqfwnsML7NApViB8b2dMQc0J7O1+Sg4nr47mQNJeOk20wxVSIvbVNWCAto0LjjFtgWT+bB1btG03yPH0T7g9Wzk8m7amUnECrN7f+Gx5hgcsZcL/Zx8rWIvc2b/G4DyoSpmCBghXjyb+hFZy8mK1ZLx1WktJQ0sgZRiA= 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 Subject: [PATCH v2 05/20] block/block-copy: implement block_copy_async Date: Mon, 1 Jun 2020 21:11:03 +0300 Message-Id: <20200601181118.579-6-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3b7f00bb-0765-46d2-9a95-08d8065738a2 X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:22; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: O387vFOASovECo9qBGVW3epKQDBwLzFAIHjNNe7lYjtNwdCrgCgMyf1jvE4RHh2ALG8lii55Z6J5ZarEzMfIdlgNQQGYlPf/yDJuxEm5z1Ced7wtgi69nurD5iL/hUL7sDp5KNowse7WiRszp+SURMswMyqFhOYjpm0uQJ/CTV1dlNmkn1MdVdxjhO/+tkp8STrWO/6rpGrkkfvX7Sv0nUI106JzoSqmUFRlQt0uTSZWludgb1OrRry3fRoECCqKk4Ra9Jo+UFO1K4wNqZon7LzsI/OAX6KHeYElai/yBrnmUl8pCn0BN1NwbO1pNKXOQGEaBgMR3oPtocRJoXQJckySfncHMI+VjyRB4nHd+fIPUCzuhCWWAKdBQNBkSWGU 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: eGEfu+LIfNTyv0tlixfSGZ3I7x090VjfWe0ynaTHmMoo7FNDwU+mkEZjtXnobO3cjLqlQFkCDBk7KuY5xq9Qb1SZeR8QIhSGGe8nEpr9LbAxKmC6Oec4vWWkups3Xzqd4xCers1jBA3UgctC2ula3NYcU8Bp2hwsH4iHpuoH7BV0+Wqpxih3C2uKbM/YqBS7hK6kg03dWSkxlskoM1EH6CeB1I8ag46V7mUPDmqrm+R3uPWbDsX+ikly+3EG6069t7Q1Z871Q6ymvJuX0b+MuhD+e0Z5grHFFYyLYHfQqfX6wbHMy7p4oCwQIKbJgUl7ZuWI4EFnRxFzfAesguKCCrqHWlAo+hN5SCZL7PAEpwkGIT9PjdkJMiMjcnfEm7laNMaZdqAvGNMLROF0cZc9P9IUp+iEa8nuJzh+uiv2jaW8FMZJV1N7NhsRTL4IJ12vZ1O+IY2s8gy8d3ipbPpEwW8KSomkm7cx26sDjn2y21s= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3b7f00bb-0765-46d2-9a95-08d8065738a2 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:35.6216 (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: tAlVUYrcQlCRkR4NGHIQg6UjimEfYhaZEACvGRtZSOzF/O7DOsR0Rg62eTo8RIrZdNVRfRDCwsM0wRaN8GxucsNqMLs1ISeznlGJLtFGfpw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.93; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:32 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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'll need async block-copy invocation to use in backup directly. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 13 +++++++++++++ block/block-copy.c | 40 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/include/block/block-copy.h b/include/block/block-copy.h index 6397505f30..ada0d99566 100644 --- a/include/block/block-copy.h +++ b/include/block/block-copy.h @@ -19,7 +19,10 @@ #include "qemu/co-shared-resource.h" =20 typedef void (*ProgressBytesCallbackFunc)(int64_t bytes, void *opaque); +typedef void (*BlockCopyAsyncCallbackFunc)(int ret, bool error_is_read, + void *opaque); typedef struct BlockCopyState BlockCopyState; +typedef struct BlockCopyCallState BlockCopyCallState; =20 BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target, int64_t cluster_size, bool use_copy_r= ange, @@ -41,6 +44,16 @@ int64_t block_copy_reset_unallocated(BlockCopyState *s, int coroutine_fn block_copy(BlockCopyState *s, int64_t offset, int64_t byt= es, bool *error_is_read); =20 +/* + * Run block-copy in a coroutine, return state pointer. If finished early + * returns NULL (@cb is called anyway). + */ +BlockCopyCallState *block_copy_async(BlockCopyState *s, + int64_t offset, int64_t bytes, + bool ratelimit, int max_workers, + int64_t max_chunk, + BlockCopyAsyncCallbackFunc cb); + BdrvDirtyBitmap *block_copy_dirty_bitmap(BlockCopyState *s); void block_copy_set_skip_unallocated(BlockCopyState *s, bool skip); =20 diff --git a/block/block-copy.c b/block/block-copy.c index 75882a094c..a0477d90f3 100644 --- a/block/block-copy.c +++ b/block/block-copy.c @@ -34,9 +34,11 @@ typedef struct BlockCopyCallState { BlockCopyState *s; int64_t offset; int64_t bytes; + BlockCopyAsyncCallbackFunc cb; =20 /* State */ bool failed; + bool finished; =20 /* OUT parameters */ bool error_is_read; @@ -676,6 +678,13 @@ static int coroutine_fn block_copy_common(BlockCopyCal= lState *call_state) */ } while (ret > 0); =20 + if (call_state->cb) { + call_state->cb(ret, call_state->error_is_read, + call_state->s->progress_opaque); + } + + call_state->finished =3D true; + return ret; } =20 @@ -697,6 +706,37 @@ int coroutine_fn block_copy(BlockCopyState *s, int64_t= start, int64_t bytes, return ret; } =20 +static void coroutine_fn block_copy_async_co_entry(void *opaque) +{ + block_copy_common(opaque); +} + +BlockCopyCallState *block_copy_async(BlockCopyState *s, + int64_t offset, int64_t bytes, + bool ratelimit, int max_workers, + int64_t max_chunk, + BlockCopyAsyncCallbackFunc cb) +{ + BlockCopyCallState *call_state =3D g_new(BlockCopyCallState, 1); + Coroutine *co =3D qemu_coroutine_create(block_copy_async_co_entry, + call_state); + + *call_state =3D (BlockCopyCallState) { + .s =3D s, + .offset =3D offset, + .bytes =3D bytes, + .cb =3D cb, + }; + + qemu_coroutine_enter(co); + + if (call_state->finished) { + g_free(call_state); + return NULL; + } + + return call_state; +} BdrvDirtyBitmap *block_copy_dirty_bitmap(BlockCopyState *s) { return s->copy_bitmap; --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591035652; cv=pass; d=zohomail.com; s=zohoarc; b=FFhV81EJxyPL+VEN7j5hjzJGUICyGYHDbS92C48tFq0AA+2j/uDuZgW1zxXIjQaD0rL05rRQd7AsUBC+xhWO1T823n+bv8BuaZOBqeCE63DOJOS8IWicRPPCAiJ+Kszpu7EZmi1Mqt8UyEX+KC+ZKckCl9X3CA0XosTchpwrVYQ= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591035652; 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=fbWcWBodNTDqeMIQ+YBmYo2fU7QxMBZqhNvrfjzyMSA=; b=Te8JUZHLIzoUiQGRXLcAV/KylYsFKD0P9E1hnYAcTZtly5afUerS+JKkMykhZYihC60G4Na1biS3cnJi5sW4ElfeV4rPKVgOB99e8DFh0lskAQkkD3ToK4jHLvTwhnAL3WGa8bfQ+LPgO8wWWAPxleCbFC44kGpoXynDX9HDG/c= 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=none 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 1591035652539523.446975154621; Mon, 1 Jun 2020 11:20:52 -0700 (PDT) Received: from localhost ([::1]:43006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfp3L-0007FE-58 for importer@patchew.org; Mon, 01 Jun 2020 14:20:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfouX-0004z9-C5; Mon, 01 Jun 2020 14:11:45 -0400 Received: from mail-eopbgr70117.outbound.protection.outlook.com ([40.107.7.117]:10211 helo=EUR04-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 1jfouW-00027N-8f; Mon, 01 Jun 2020 14:11:44 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:36 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:36 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OfHboGmhLqzKoczWKLksxaej9PyU8ZdvQVhJpIy0a/QpfdpsIcfbaKdNUsNgFyyjPTEjqAVT64VCiSwq5l+Jz3+OgG8JTPKmmjK9vr4+QWpSLD0D1HQyxsgGhAhlIENOKCIF8AJ8rmm0NQiBCzpO6BHpwcfGIoepzmOurxaYR9oDlIu9saftl+umwhb9dqw7ETOYTb2EmA3PuqtyYWcvMseXQDytvHAUhuCRI0pwW2TQUGgh62KMVmN+wcvobujgdWckcmI/fMoRYoJflRF/QfAKlxmvNCNvMKRoji/dtf+eo0JnzLtdB75xF6Y2iGJWm1xDMa+tHcOB7iohftu4zA== 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=fbWcWBodNTDqeMIQ+YBmYo2fU7QxMBZqhNvrfjzyMSA=; b=b5embH5l/A9N79L8NUQIwmOSj2AjK740tfJAhgzsuhFguN9Nte1lTu/VCftKIZI37FZEAx4S9ZTChMeMx3L197aavovBNi/O1vg8QW5pyl61XFPJJaSsNaEQAvrc7Rtm0100pRbW3bs3IF1eM6mGfj6JXD4BV+v8kKabQIRA7u9o9vCkdRf1qSF88iTueu4M8S+gYXKd+36o0si0TycOzXAwCsgXpStqlfx0qqd0ePnIGrgSz8Q23t5Zp+mm9fpSy7HZejcnoAPwM5Ly61tDVKaQz3BDSucND6xqOCHgyMAZ34OQJHr+LjCsvxQG3UvCM6hgU++fxq8fQKpDKX3m2w== 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=fbWcWBodNTDqeMIQ+YBmYo2fU7QxMBZqhNvrfjzyMSA=; b=fj6UlBx7fbpS/2VMCqWH4kZv0WQfEXi5I/toMAX3KrxtaG166TdyOqX8fANe/zE/2191LLWCaOvjQYw/He2DnB180RbDdC3C3mjYaRrvScHvD9hmmN4HoEdxAY+oxEBcDWOmnwRTxNQepk23rdfPNwxUoMXAfN9dHw45bMdj1lY= 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 Subject: [PATCH v2 06/20] block/block-copy: add max_chunk and max_workers parameters Date: Mon, 1 Jun 2020 21:11:04 +0300 Message-Id: <20200601181118.579-7-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 45762ee3-8c0d-409c-ac6c-08d806573922 X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:20; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8AXyk0Sf10ncue1a1+sTcz3Oea3YIBpWakJmliCo6LGsVBem+CYEf7rb3nP5oHZ4YZG5frHX796bYdC0L5+4RzRCR+90L8IoEzPD5JL7/H/Ijc2yhpnIhRl+aBMOVgQi1SJN8k+Py8ryiYwHv3PwTDR24B3AIZ07kGyAx7o/T+s7LIXSwmEsU9vudGElCD3NDomAPjwwMxVIyc9RTpccTWcFvdMDhH73I1l0Db8a2B99eSrgyhIs/1qVGRe07fRS74YzfNFTadtt67KL2Es3G3wwyfp3d5G0bBJj2LJDHnOTr83bIDB+dRWTGcZ83QfXIb60/00g6D90uGwFFUJLGnY+JKdufo0Po9U+jC/Hzm9Gc0IS8rMrVbbVDtx3ggLu 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: Lz/bSZuqgGoLRwNI4gT0K5bn5ZUIWrmqYtXKjoqRasMuvcJo8q0ZaqCz/wIBflaSssj16APWjZD+a7yWjxTHBJiaJViG/M5YB3MRMMnwdMgUme5ZroV8fgI74slkH9gkm909OGIii3FbVcLROaGxTozWBb4p95R2mjXJuJ7J3BSEwRJ8P2nVJdH9P5ZyHX+VpHVb0WdDAOmvKq7j5VP+ZrTzUiJEe66Re6NlcJIvFmFy0vRZd7z7ndU8AVqLLYxpK+oQvKadyIj5QLE432RJVIYyafNezdeDa7hckTu0/BOHbwxdP7iXgYZS2HBoDpBHpxInOmacp047baStXmkFDsOV9qmCyu6UumbNicoaLSZ9DvZBABIebaz40mxsl2m/PqmMnPDErqaTuIWJndMLfS4Vt67mNbmm5hC8huUSAKGjkFlZmEHM3RifeVgiJGk5F3ZjkS0dk3ysbLIB3SoOw1RnzIf/82HeS8AxL7ZLEUk= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 45762ee3-8c0d-409c-ac6c-08d806573922 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:36.4739 (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: 6iUEST8dVetaSsyORvbbREW4PU0/4MeOnxXjoO//ARsDOUlBSMdyGVW8k7nSTVXnc0rbJzjMs71KlTGt9sPfvKvsMWNYnUjY35skudyHR3k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.117; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:40 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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" They will be used for backup. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 5 +++++ block/block-copy.c | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/block/block-copy.h b/include/block/block-copy.h index ada0d99566..600984c733 100644 --- a/include/block/block-copy.h +++ b/include/block/block-copy.h @@ -47,6 +47,11 @@ int coroutine_fn block_copy(BlockCopyState *s, int64_t o= ffset, int64_t bytes, /* * Run block-copy in a coroutine, return state pointer. If finished early * returns NULL (@cb is called anyway). + * + * @max_workers means maximum of parallel coroutines to execute sub-reques= ts, + * must be > 0. + * + * @max_chunk means maximum length for one IO operation. Zero means unlimi= ted. */ BlockCopyCallState *block_copy_async(BlockCopyState *s, int64_t offset, int64_t bytes, diff --git a/block/block-copy.c b/block/block-copy.c index a0477d90f3..4114d1fd25 100644 --- a/block/block-copy.c +++ b/block/block-copy.c @@ -34,6 +34,8 @@ typedef struct BlockCopyCallState { BlockCopyState *s; int64_t offset; int64_t bytes; + int max_workers; + int64_t max_chunk; BlockCopyAsyncCallbackFunc cb; =20 /* State */ @@ -144,10 +146,11 @@ static BlockCopyTask *block_copy_task_create(BlockCop= yState *s, int64_t offset, int64_t bytes) { BlockCopyTask *task; + int64_t max_chunk =3D MIN_NON_ZERO(s->copy_size, call_state->max_chunk= ); =20 if (!bdrv_dirty_bitmap_next_dirty_area(s->copy_bitmap, offset, offset + bytes, - s->copy_size, &offset, &bytes)) + max_chunk, &offset, &bytes)) { return NULL; } @@ -616,7 +619,7 @@ block_copy_dirty_clusters(BlockCopyCallState *call_stat= e) bytes =3D end - offset; =20 if (!aio && bytes) { - aio =3D aio_task_pool_new(BLOCK_COPY_MAX_WORKERS); + aio =3D aio_task_pool_new(call_state->max_workers); } =20 ret =3D block_copy_task_run(aio, task); @@ -695,6 +698,7 @@ int coroutine_fn block_copy(BlockCopyState *s, int64_t = start, int64_t bytes, .s =3D s, .offset =3D start, .bytes =3D bytes, + .max_workers =3D BLOCK_COPY_MAX_WORKERS, }; =20 int ret =3D block_copy_common(&call_state); @@ -726,6 +730,8 @@ BlockCopyCallState *block_copy_async(BlockCopyState *s, .offset =3D offset, .bytes =3D bytes, .cb =3D cb, + .max_workers =3D max_workers ?: BLOCK_COPY_MAX_WORKERS, + .max_chunk =3D max_chunk, }; =20 qemu_coroutine_enter(co); --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=virtuozzo.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591035617926998.0594523970777; Mon, 1 Jun 2020 11:20:17 -0700 (PDT) Received: from localhost ([::1]:40142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfp2m-0005z6-80 for importer@patchew.org; Mon, 01 Jun 2020 14:20:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfouY-00052V-7A; Mon, 01 Jun 2020 14:11:46 -0400 Received: from mail-eopbgr70093.outbound.protection.outlook.com ([40.107.7.93]:39047 helo=EUR04-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 1jfouX-00026c-1a; Mon, 01 Jun 2020 14:11:45 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:37 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:37 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QqzTAByICg9bl7mhpJDK9GdOn3zjN2a7afflnJcnEtg2RelUyz/L7Gc17Rvgw6ZSqbh8CQLMPbbHUg8WDEnmEO6uvrI60mxLnU8DiXZdtei2ikKSL0tR6Dpvzg2pBZES8QiUtaxPVxMyDAbsvHiuO+BytU3KK0X5eNzT3vw80T1WaLf6Z8c5nSeAkhDjcUqP40pfI1Do/n7RGglU89nX/beb63/HMuwOYK5ZYUCDEy7uQXh+yXkfNOJekSuKvMZcWCi10EgVdqIqhgYaUJjyK1f0EILjaq42ZI9qMcJh+h+Em/G82LJrXAPKeZFjSnBvF05NH7Qr/CDgJ+wlI8RXgw== 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=85i5+xBw2B6rOENuXOGZJnaqvBK5TcYKVhlQx0CFcz4=; b=SvYU0gweRoDopflodnzzPdYypsD5KjXUtZ8+YFLlB8d2qdHI5zlSj/xQLqB4wML/q6MILnAqUZ5+C9Z9LVMG0/Y45jY74+yeNgxEHoJMBwlHq+kqaqVYwA1efWCwYIuNsLYQHEf2lFcxV6oVVa9UWs/kemPDURITqqZN84A73BJFWObEN5g/YjuvhOCoPUJ4rrs2LF6FndxKzyIU9aeJDsdLxZCqx2FRDxAKayGfcYJQGAXud4V3yrKkm6MjLX4NHQWd1vOCRyvCrfdBfcLJMWKkocuqi2YubT6KNXatsLP68BGIPEFt0z/r2sPF4/JNW8KiIH0uK8M8w9I/eenv5g== 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=85i5+xBw2B6rOENuXOGZJnaqvBK5TcYKVhlQx0CFcz4=; b=oMmjYehz43lERJrNmEHfFFPrHJe/ipYkQqAe0O3vXZFuFi/3DE50kBweMGMCQU4WAA14eztHlUzkLpQPCB+jUp3/WixQmdP35L4Og+RrZXS4UazZ7baEp9R7IhId7irdEyjitkNG8Y1RGeyrXkFN4HpoMraQVs2JPCtYbya1DJU= 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 Subject: [PATCH v2 07/20] block/block-copy: add ratelimit to block-copy Date: Mon, 1 Jun 2020 21:11:05 +0300 Message-Id: <20200601181118.579-8-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9269cd3c-beb5-476f-d1cf-08d8065739a2 X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2000; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Kr2+j103aaNjRDv9Nal3anWEwQNqaVxJOLKYqVhto904H5zopXxofFN23QGqlR7+JPshwGnjTW7fAcCOU9EN+hc22Tg2bbuLdvZQ/cXz6yoA7poYdAXC/MGU9n+bl66eiZIs/lAen5D647xT57IqnVjXfkbqL7F9cV/RpYe/XrHurMfucQtYCa5RnuyNUpJFffr4BC0WvIrBrRcT79nMtx0KKhYORr0IVENtM3E8EXoSfahKxYYv/CxWMzeJD0Sg655bk1s0SnHr3717ULtUkRQ19YFTQvE0zQAEMWpJkdVCTt8wuU1BECvXFE9UKgrKs+f5XeDtSJcl3/LahlFYQdd1+/Jq0jflhSE108mbWImQltUnsp2p5dGoYOjOJNk9 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: Y+oCV6PbTcAIUoXkokxj55Zfm6vwbdnhf4PJ7D+MzQcJQFtroc53VBJlcQSUzYPYmiwV7Yi8Fp2xNIWazPbZRNHp3wVc8qP13LGtHQD8UXBy5dbXy6PQsUfpvvhcHahYKR+a+IPr5vsVngi1mUaEjep8BUwdt02GbUb1Yay5RifjSpl74QjuBWggSLxOfVaAeQe6YiCYXF7VuQqUOqEvrFeVLMXiteK98EkKgpjUMDK6vu0Sd0h+UVTIhwXK21C+nqaoJpQBteP8KyoWw4f2NUQYgRXO6qEr+nkorGZpyufVUDN+tmzUOiMBx681dqE9L7OAcMNi34U7Mf8ETY7j+034P4sY85hzEvVaTV9CWX0On80LS8SOTGUyvwn9b0fOrTJ6vqmN3SbTn9iQmpPPi7EdR/+YOsEGnaUKRGYTEFOSQqpz64LkH4VQ5NacX8M4g2kFLiGJ9BVIrSOflBo2JZnQrjZvug/foHVxBet32sw= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9269cd3c-beb5-476f-d1cf-08d8065739a2 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:37.3306 (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: N+FPlSG32niV16jp/NfurEpflgExoC0HyZola6BgHroc2TmhWLhUaGMit5twiCHlH6jNNWy43KazQM1ITovhX/asbETOB8A77F8hb/pLL7U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.93; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:32 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Computed bodyhash is different from the expected one) Content-Type: text/plain; charset="utf-8" We are going to directly use one async block-copy operation for backup job, so we need rate limitator. We want to maintain current backup behavior: only background copying is limited and copy-before-write operations only participate in limit calculation. Therefore we need one rate limitator for block-copy state and boolean flag for block-copy call state for actual limitation. Note, that we can't just calculate each chunk in limitator after successful copying: it will not save us from starting a lot of async sub-requests which will exceed limit too much. Instead let's use the following scheme on sub-request creation: 1. If at the moment limit is not exceeded, create the request and account it immediately. 2. If at the moment limit is already exceeded, drop create sub-request and handle limit instead (by sleep). With this approach we'll never exceed the limit more than by one sub-request (which pretty much matches current backup behavior). Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 8 +++++++ block/block-copy.c | 44 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/include/block/block-copy.h b/include/block/block-copy.h index 600984c733..d40e691123 100644 --- a/include/block/block-copy.h +++ b/include/block/block-copy.h @@ -59,6 +59,14 @@ BlockCopyCallState *block_copy_async(BlockCopyState *s, int64_t max_chunk, BlockCopyAsyncCallbackFunc cb); =20 +/* + * Set speed limit for block-copy instance. All block-copy operations rela= ted to + * this BlockCopyState will participate in speed calculation, but only + * block_copy_async calls with @ratelimit=3Dtrue will be actually limited. + */ +void block_copy_set_speed(BlockCopyState *s, BlockCopyCallState *call_stat= e, + uint64_t speed); + BdrvDirtyBitmap *block_copy_dirty_bitmap(BlockCopyState *s); void block_copy_set_skip_unallocated(BlockCopyState *s, bool skip); =20 diff --git a/block/block-copy.c b/block/block-copy.c index 4114d1fd25..851d9c8aaf 100644 --- a/block/block-copy.c +++ b/block/block-copy.c @@ -26,6 +26,7 @@ #define BLOCK_COPY_MAX_BUFFER (1 * MiB) #define BLOCK_COPY_MAX_MEM (128 * MiB) #define BLOCK_COPY_MAX_WORKERS 64 +#define BLOCK_COPY_SLICE_TIME 100000000ULL /* ns */ =20 static coroutine_fn int block_copy_task_entry(AioTask *task); =20 @@ -36,11 +37,13 @@ typedef struct BlockCopyCallState { int64_t bytes; int max_workers; int64_t max_chunk; + bool ratelimit; BlockCopyAsyncCallbackFunc cb; =20 /* State */ bool failed; bool finished; + QemuCoSleepState *sleep_state; =20 /* OUT parameters */ bool error_is_read; @@ -103,6 +106,9 @@ typedef struct BlockCopyState { void *progress_opaque; =20 SharedResource *mem; + + uint64_t speed; + RateLimit rate_limit; } BlockCopyState; =20 static BlockCopyTask *find_conflicting_task(BlockCopyState *s, @@ -611,6 +617,21 @@ block_copy_dirty_clusters(BlockCopyCallState *call_sta= te) } task->zeroes =3D ret & BDRV_BLOCK_ZERO; =20 + if (s->speed) { + if (call_state->ratelimit) { + uint64_t ns =3D ratelimit_calculate_delay(&s->rate_limit, = 0); + if (ns > 0) { + block_copy_task_end(task, -EAGAIN); + g_free(task); + qemu_co_sleep_ns_wakeable(QEMU_CLOCK_REALTIME, ns, + &call_state->sleep_state); + continue; + } + } + + ratelimit_calculate_delay(&s->rate_limit, task->bytes); + } + trace_block_copy_process(s, task->offset); =20 co_get_from_shres(s->mem, task->bytes); @@ -649,6 +670,13 @@ out: return ret < 0 ? ret : found_dirty; } =20 +static void block_copy_kick(BlockCopyCallState *call_state) +{ + if (call_state->sleep_state) { + qemu_co_sleep_wake(call_state->sleep_state); + } +} + /* * block_copy_common * @@ -729,6 +757,7 @@ BlockCopyCallState *block_copy_async(BlockCopyState *s, .s =3D s, .offset =3D offset, .bytes =3D bytes, + .ratelimit =3D ratelimit, .cb =3D cb, .max_workers =3D max_workers ?: BLOCK_COPY_MAX_WORKERS, .max_chunk =3D max_chunk, @@ -752,3 +781,18 @@ void block_copy_set_skip_unallocated(BlockCopyState *s= , bool skip) { s->skip_unallocated =3D skip; } + +void block_copy_set_speed(BlockCopyState *s, BlockCopyCallState *call_stat= e, + uint64_t speed) +{ + uint64_t old_speed =3D s->speed; + + s->speed =3D speed; + if (speed > 0) { + ratelimit_set_speed(&s->rate_limit, speed, BLOCK_COPY_SLICE_TIME); + } + + if (call_state && old_speed && (speed > old_speed || speed =3D=3D 0)) { + block_copy_kick(call_state); + } +} --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591035737; cv=pass; d=zohomail.com; s=zohoarc; b=BuMGPP0xrnrpPn5/9wukT0yh0CYRS9yBNX56k76ocDaN78Oq+cJFGvMaJAwwn6gQeDj4ZQYk8f9vqUe0X4l4DK91puzAG0y4dP6Qo78xQaITT+7G4MsE/zURMB+aPzx6JspkS18lXukB7YuYCQ57s10MlVJzEvFn8DGpB2ufxdw= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591035737; 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=xvM1RkOIAPydDLspA2665/HBjdPiJEGHYHpWD/s5Y+8=; b=BTKsId57XdTgChY2ygEy+X5uGxyI5aedmItuxOhVzukh5ezbyJWeIreJcqctvL5Uf7RAtsvaU48FvvmJRH+jKgqggQcz6kWMVX4yHvI+NlcI1ATsEXA52EDx3VGgyRreTDOn8yxgeOeax+s2djeMaIkbyeJa94Am19RE9C1fJH8= 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=none 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 1591035737109131.53905175470993; Mon, 1 Jun 2020 11:22:17 -0700 (PDT) Received: from localhost ([::1]:48678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfp4g-0001GX-Pp for importer@patchew.org; Mon, 01 Jun 2020 14:22:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfouZ-00054n-2r; Mon, 01 Jun 2020 14:11:47 -0400 Received: from mail-eopbgr70117.outbound.protection.outlook.com ([40.107.7.117]:10211 helo=EUR04-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 1jfouY-00027N-1n; Mon, 01 Jun 2020 14:11:46 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:38 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:38 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EAq0Q7eHysrcDJ3wKjQNPHj2Io8gpsrEN43J1M1w9eOGzJitivucXND/KBECISQaZnSW8Eoe6S3+oaCuVjaDbAw2G9y8SGtXR1QcfMXOZGudqp/QZTLuPw1xmsJ2Ku6D8pkpwSUu42UVsfO23umM7eRiPR0MIub/3zc+6TTZRt6Zc07XY2EO+aIZHHEh3vbswgNtecdFhwsLhMAVvapHbnYS22PVXLCvo98+rdyXWG++GjfprEWrnnFZqLYvANdFBQwQSYC9xe2RqrKBx8q77Q74kNZK+GLOo5hXlpyj18iAKZL7tf1xfx1g+9Rnu7qnlLhX/cZyUsfiKwtWilUR/Q== 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=xvM1RkOIAPydDLspA2665/HBjdPiJEGHYHpWD/s5Y+8=; b=ACOkJFs3KwWmJ9L/hqTNKhgsEli1m3ARHRavpLe1WwEbiJXdVRVZYMQ9y68oHE4ygyysadJrFJmeMS8eVtU3ZxjoJCHiXD62SoVx/pyH5NlY+xRKfd0b9frwqc7ys7AvEb8yHQcimUpnvrmK/3yawP6Gm5d26YisT/Of0A1gGI45p0zi8pSsWakbNzq7kzAysyGEHEK6Cufqixo43IRKBipxSN8PY8mVAcrjYJbb6ylFcX/9RDmEZGMI3u+uDtNMZG24XG24j2aQ8x/FThRBkUOOfs497GMsmodv8LRK6bRq024DbiyzyHGjmBbvzAYgHvxW3e+Tuj0Ezndly8RIHg== 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=xvM1RkOIAPydDLspA2665/HBjdPiJEGHYHpWD/s5Y+8=; b=N/IO0RxxcqRpSoSGvSOy2sg6l/iezPTia4SWekg92OklwLjxV2EwwwGn4mYMkh4CqYJvHBdkrx7xwCJ91hwZrYuIRUru8uVsv22+aT4cmEhltKEPLt4CItxpUeAhNd7EukXR+9hQ1fYVStwRy/xdYkLSz9s7KsNMV5Gwpdj+MDI= 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 Subject: [PATCH v2 08/20] block/block-copy: add block_copy_cancel Date: Mon, 1 Jun 2020 21:11:06 +0300 Message-Id: <20200601181118.579-9-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4b6352d2-3c41-4b6d-b69e-08d806573a2a X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:46; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zigWdqXs2cPX9seloCEHrCHT4+IOo5O+3S7EssSADD8rBM4rUDjCE/GM6pDSl2h2vp94B2NYVV+BR1vHqQI+VheE9vDSnaqvG8VzNOqdzhJpISbehvnS/+biKxtrnehhwAsuMxRx+XCekgVw/kY1Uz2rXR5oMHh0FbsUm5WTCS8WP1LUET+npcJmAA1aiC5JYuV/zE+COrH3VXEwjAcjDVrqwVF2w5S6p9o4TPg+ddnqJ+06BcwZ6OMCfNEjSzhO/FZhecfUKIEwFtwDif/yaAY/o3zlzKWnSjIubo7GDT1WSsNMtTfEaBzyXmXyUkNM2rosuAJMTpW6LlosRveMY073A/5brvpIb4LKZIZ8RCF8OXVM8yRYo4QLf1+jN96W 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: eANPC1iiIc0Be+b2wTRpqgsNMvqYK3vvy6TGTOr/nPpt7QKfifBVo9KnkHotCN4TPwpCzB8YNMKxwuXPs4bJwiXxU77jhZ7fbbHs4yvHozc2Q86nWjP2y8SdwwQ3QHi3ULaoV0Ga5RCOzLrlP/1QNBQ5T+M6cCBCq/Cppvtwr7MRDX8nP9T4Ecq0de/WFqM8eLrrZGxvgGI+6JjKB11AtvSFKP1669S3SNADp5gqCd4klkHB9Fcpt0at3ETDgVIuSMWjqD4gFBY8w7frhjKla9vaLqiE5NlNuKae5sDCkHZKtU9I9btH3WuCQ7ZCwMa8cGwmJmh2KhUwUCgxwNv/3z3L0f8JaTGuVjFyEVLabTkFFQOrgQMSNkxzkMJf6Kio0kyjUr/Tu0dYyteRGtFDjtEi0mT0GY6xfRD7zwM9KjFnOdnf7yFvV7CnkV12U9ThSh+CATvXcI0KniAGcafPZHW7lGIJsxItACYOArcQ+xU= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b6352d2-3c41-4b6d-b69e-08d806573a2a X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:38.1993 (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: tFe0+cxho6ay5q8m014dTsF9UlgK/+8GyYV4ghoYzIqx6VpsLNjvAvH8/6j1eLSLCit5YpcLqJcixHPEE8Mb7H9hvNKqT4Ia4/URGcEbNDk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.117; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:40 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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 function to cancel running async block-copy call. It will be used in backup. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 7 +++++++ block/block-copy.c | 22 +++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/include/block/block-copy.h b/include/block/block-copy.h index d40e691123..370a194d3c 100644 --- a/include/block/block-copy.h +++ b/include/block/block-copy.h @@ -67,6 +67,13 @@ BlockCopyCallState *block_copy_async(BlockCopyState *s, void block_copy_set_speed(BlockCopyState *s, BlockCopyCallState *call_stat= e, uint64_t speed); =20 +/* + * Cancel running block-copy call. + * Cancel leaves block-copy state valid: dirty bits are correct and you ma= y use + * cancel + to emulate pause/resume. + */ +void block_copy_cancel(BlockCopyCallState *call_state); + BdrvDirtyBitmap *block_copy_dirty_bitmap(BlockCopyState *s); void block_copy_set_skip_unallocated(BlockCopyState *s, bool skip); =20 diff --git a/block/block-copy.c b/block/block-copy.c index 851d9c8aaf..b551feb6c2 100644 --- a/block/block-copy.c +++ b/block/block-copy.c @@ -44,6 +44,8 @@ typedef struct BlockCopyCallState { bool failed; bool finished; QemuCoSleepState *sleep_state; + bool cancelled; + Coroutine *canceller; =20 /* OUT parameters */ bool error_is_read; @@ -582,7 +584,7 @@ block_copy_dirty_clusters(BlockCopyCallState *call_stat= e) assert(QEMU_IS_ALIGNED(offset, s->cluster_size)); assert(QEMU_IS_ALIGNED(bytes, s->cluster_size)); =20 - while (bytes && aio_task_pool_status(aio) =3D=3D 0) { + while (bytes && aio_task_pool_status(aio) =3D=3D 0 && !call_state->can= celled) { BlockCopyTask *task; int64_t status_bytes; =20 @@ -693,7 +695,7 @@ static int coroutine_fn block_copy_common(BlockCopyCall= State *call_state) do { ret =3D block_copy_dirty_clusters(call_state); =20 - if (ret =3D=3D 0) { + if (ret =3D=3D 0 && !call_state->cancelled) { ret =3D block_copy_wait_one(call_state->s, call_state->offset, call_state->bytes); } @@ -707,13 +709,18 @@ static int coroutine_fn block_copy_common(BlockCopyCa= llState *call_state) * 2. We have waited for some intersecting block-copy request * It may have failed and produced new dirty bits. */ - } while (ret > 0); + } while (ret > 0 && !call_state->cancelled); =20 if (call_state->cb) { call_state->cb(ret, call_state->error_is_read, call_state->s->progress_opaque); } =20 + if (call_state->canceller) { + aio_co_wake(call_state->canceller); + call_state->canceller =3D NULL; + } + call_state->finished =3D true; =20 return ret; @@ -772,6 +779,15 @@ BlockCopyCallState *block_copy_async(BlockCopyState *s, =20 return call_state; } + +void block_copy_cancel(BlockCopyCallState *call_state) +{ + call_state->cancelled =3D true; + call_state->canceller =3D qemu_coroutine_self(); + block_copy_kick(call_state); + qemu_coroutine_yield(); +} + BdrvDirtyBitmap *block_copy_dirty_bitmap(BlockCopyState *s) { return s->copy_bitmap; --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591035388; cv=pass; d=zohomail.com; s=zohoarc; b=eAJjgrIWjN77bLr6NW4esROCVRk6KcP4LWrtFCoXXdHY4kngfzXr3Zo3Vm/6MPgKcKoFqEBxOGQ8hionS3FguYURD2v2c3fAwZJiURLjeM31rRovxmdkX7ieQF3MNeUiMI+CN5GqJayhfgE8b7Pke1oZfd51RGlw6TCklLXkh/E= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591035388; 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=znFRNezH6Gtp7Y4DMShKTwpnLuEmwzp2+Pc99rpaJ/g=; b=Qe94nQ4mBSR1YyKgeXpNvPDYifhxmAT+siUvtx10KblQf0Oja+rdqFTLrDFPn/xqeEQnASM2PCCT7DD7YWCCPfoC+kZuWYwuDnyyWB38A/3DiQVEkdsZI4hT99FZrxi3+det+dgQBATo1l43F03GLvYjHu4jos1omGm5pJBAdNY= 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=none 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 1591035388894963.6119167815632; Mon, 1 Jun 2020 11:16:28 -0700 (PDT) Received: from localhost ([::1]:60834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfoz5-0002hy-7Y for importer@patchew.org; Mon, 01 Jun 2020 14:16:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfouZ-00056f-PG; Mon, 01 Jun 2020 14:11:47 -0400 Received: from mail-eopbgr70093.outbound.protection.outlook.com ([40.107.7.93]:39047 helo=EUR04-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 1jfouY-00026c-QH; Mon, 01 Jun 2020 14:11:47 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:39 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:39 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mnCuatbqJJB8fVad7xCQKQ7JHiVIL/DfHCyJ9mcKHn+FA01YkI6kIBbxc2p9qCQjJ4eAoCPCJsrKVcKRjVqY3oJSQVBQTheMqzbHm8omVK1MonT98pjrNfnZitgc+RrXGHFD8cQHiviLodFoKy5Kgcz6UNlpzze3QYE31lJpEqEbrI1PfhMue/0Z9lVcTzVwyBL79CaKEWACbuUeUyffCuBcbGC7lolOc67SxJqtx3hJoNdgFOT0EOfdebtmAzFlVI9Rs2qXzLUGov4REAtZDXWxq78+WDPSqRiJkST/qMSAEd25h3AUrrb4sKYHnKCmao0tmplDbNVed6T3bhUN7w== 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=znFRNezH6Gtp7Y4DMShKTwpnLuEmwzp2+Pc99rpaJ/g=; b=nwNQSbQfpJMOz4pnqZ0gmxq08piyJ9rElAzq86NY7rQFaA4ueEeqCD8wuPEYnLnVjTYMbspTwrWqTHb6S38g7oJiUytXPoLqOXdMDuB+fgHxj3aeeJvQ7wLoo//WB1DA4TpEGZsLg1qyyYfqmK6FHBdhw2mbQlZGlbIAgjaiO9RKtKRYPitWG8xSALR6I8ULlnvyvj/EMOmSWvKQC7WmDAeXBOy5T/Kxhypr/LAvNHeAmNfO9cGZ3KgbylczamJgtJHJE0ZE+AIDIY6S3L8N+5TTXuEc8wD69P5zW4c5rECTLPCAe8ovHZ3hUJa0gM5nWJOHliSYjoxlCSN1Rtk0BQ== 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=znFRNezH6Gtp7Y4DMShKTwpnLuEmwzp2+Pc99rpaJ/g=; b=RyhmMp7Y7/R28OaqstmLuFRgHSYWhVtegQSaWsc4LghHbuGVZZ41GK6Nqy3N0bm6jrBNZVK5OwkFNhqdBwvTW1/1M9JJd9s1Hc+S/R43Uw9sMtudIpsehK3IOMh00jn112weZm0sNk8ZvMjPB9NWG2Y18vo5VWVlU4Yo8K7Eers= 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 Subject: [PATCH v2 09/20] blockjob: add set_speed to BlockJobDriver Date: Mon, 1 Jun 2020 21:11:07 +0300 Message-Id: <20200601181118.579-10-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 01ed54af-27e3-4d86-efa0-08d806573ab0 X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1227; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3I9nsrUqyrp8jcJaN4AWnbRxIA0gZWBRnDCTaRsQ3ajk6U181z1U9p1NbfAnD81SnT/ua+tbuc5ryY7MlHfWuNZ1HPP0rGAEW0H0oBDbe9+8yXiEi9hD4qeQffC8vvt1canB0lvG0cDgmr2suRdiPr5LdYDWqH9SzipO3l2AeKyq8FUY0p8F4P76GTU8CI/iljb/pmt/ysLmkAwdPlOzLz4+tm7scsGJLMG6u4qZzxIcDIzUb8rc8Fi9FP6KelNk9NCAYCf4LxxC8zsPwIUqrR8ssqeiHDta4PI+u9XplmvoUg1FfelACkX56iz+HgeJtC+ILJMz+QZpnqgVWQARlL4gcSwjr8WlqyIuyoaC91KHGbj1F5pqH2mQiaZ75/D9 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: pMDDGYn1Q0LRTh5Rlxk3enp3SVACN0Tpm3Qnifwx0g59XfnSknSCkj10eemPauPE/Vj74AFB3m6n23Dtms1mW1df0vb6XXmNo50bDv9IQ2cAyajkJXaOg/QJF8+uTPMuANs2/k6n9eF4+0xaXs4qHFQ1Vpr8nIeWtq5i66IwFE8HTKE2BWWdlmiI5EYsWkAye1+w+gk/tPJAvoNC+qntczqc59ORmTnnCIh9TWyYdAKWERY+y8H5hUOph4g0fbiskW3qXSMBwK2spuoIyeR7QypDZv410xChkY/y+6uGInWIx/LEc6MIOPeTRq9ef0r8phptBre445JsIFDHMmB1vuJbghaT+Cjw6Bn3854VKD365jc5L0VKLzVdMKygnzOh2xqdqyDrXqNSNTkY5JFUxeWxHfYivxh9GuIy4Boqdh3WwwxxHIGUUU43aVTu4+X6N69EJSDazbzUICaGmt7IM/BBK745GdSNPUDtCvectBU= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01ed54af-27e3-4d86-efa0-08d806573ab0 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:39.0810 (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: 9y3zb8noGlsVzFfr+96h3p5lfo2sc9ZCX+yRjefECSiNwlJgvsmXID0EGnD68lqGLNnhmQ1RrUwwhfLKhxl+T78pB902IXI7rFxoN9tpLJg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.93; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:32 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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 async block-copy call in backup, so we'll need to passthrough setting backup speed to block-copy call. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/block/blockjob_int.h | 2 ++ blockjob.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h index e2824a36a8..6633d83da2 100644 --- a/include/block/blockjob_int.h +++ b/include/block/blockjob_int.h @@ -52,6 +52,8 @@ struct BlockJobDriver { * besides job->blk to the new AioContext. */ void (*attached_aio_context)(BlockJob *job, AioContext *new_context); + + void (*set_speed)(BlockJob *job, int64_t speed); }; =20 /** diff --git a/blockjob.c b/blockjob.c index 470facfd47..6a0cd392e2 100644 --- a/blockjob.c +++ b/blockjob.c @@ -256,6 +256,7 @@ static bool job_timer_pending(Job *job) =20 void block_job_set_speed(BlockJob *job, int64_t speed, Error **errp) { + const BlockJobDriver *drv =3D block_job_driver(job); int64_t old_speed =3D job->speed; =20 if (job_apply_verb(&job->job, JOB_VERB_SET_SPEED, errp)) { @@ -270,6 +271,11 @@ void block_job_set_speed(BlockJob *job, int64_t speed,= Error **errp) ratelimit_set_speed(&job->limit, speed, BLOCK_JOB_SLICE_TIME); =20 job->speed =3D speed; + + if (drv->set_speed) { + drv->set_speed(job, speed); + } + if (speed && speed <=3D old_speed) { return; } --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591035637; cv=pass; d=zohomail.com; s=zohoarc; b=d4w/T+ZHOVCISi8TnYoigla7+ZrOjVFzkEm8OanHm+blnumKsziK2vs2bgNoqTAOBfK8LUf4D/dxEigWUVpPKsQk0aud03NKLU/ATuoOCNHBTAI0cpPooukCPU5aG3DpV+Z6g0bUfTUPVSeXk2FiUpxZ3mez0vrShyTWEZTWJdY= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591035637; 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=TEy0Pt/3jNPnZgXnM+NB+VMQBzQbqKsa5rmxkfRi2Dw=; b=nR2zHmNTt1L1CswzDUzVtkbyk/vmFDvF+M8WG73So4PAZKznUYFiiIjCisAkR3uHvplD3nyn47N7SJY8sX5Hu6/169nw4+x8H9oDbe9+SRrR/sAwAZ6GAMgENBsIEHlQBlzWxL1+H8C1xrTDkpd45v7E8rOzvx6LiU4XN1rwXFo= 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=none 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 1591035637707355.9393504728756; Mon, 1 Jun 2020 11:20:37 -0700 (PDT) Received: from localhost ([::1]:41724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfp36-0006g7-7C for importer@patchew.org; Mon, 01 Jun 2020 14:20:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfoua-00058n-GK; Mon, 01 Jun 2020 14:11:48 -0400 Received: from mail-eopbgr70117.outbound.protection.outlook.com ([40.107.7.117]:10211 helo=EUR04-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 1jfouZ-00027N-KR; Mon, 01 Jun 2020 14:11:48 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:40 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:40 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ROWhTxOolZmx9FWSkkelPxAL9GkrtxJhDZFlF+oftlViK2sjigx2nEB2YE0ibga8CHaq7bPqLABw788HiZAK1KG17zZSVJLdRL4IkzYWjYJSZ/3uXv2tRlsMjBfKT8kc0DAvUBbQ5YHeF8BQxcWHuRvq/VQk/CfAQd0Hb2F7qvu6HN816jZAnG2LTeYoI0gaxvFENFCIbNV6wb0v38PkmtCIrprJB4x86fgIZTMWaLtxVB9XTyJnheb7s/D4WqAiTwLU8l1i3tQ6xiNAG81qerMVH1sA/nziF0JBy6aAyGqMcqM6cn+8JmNRxkgUVFebD1WJn+l1v1VFMunfw4NTMA== 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=TEy0Pt/3jNPnZgXnM+NB+VMQBzQbqKsa5rmxkfRi2Dw=; b=Mu6wocMB1/cbUQKFpGHqfYlAvNHoaJop5QQjhdDXmvTMIIFY778xbIZBb+JUjV4M1RIjU6HW77cMMJG3icpBjNIuxVjgnCP/ynfEJzXPyrFZSnqafYSeKkbVvMgqFuB7C//ndrANDp9k5gMOHvcDTOqM0blmbaJ56FpAo+34P8IOupqqu7PKHvXO5PAVgNaDZoHQv6mKKqeCmD62/ImqZY66dyV2pMpBS71lxkCFRBr/twRTO94AzNdBG3hiwA6oKHU7u8Z7ElHP7l/53dDHEYSZN/CMX+Kr8Sjd1P9THajXP+Sl7CzjUSzGQtTFP5UwLg0jjuiv/u/oPJRx4+9r1w== 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=TEy0Pt/3jNPnZgXnM+NB+VMQBzQbqKsa5rmxkfRi2Dw=; b=nuJT8T+2+cyuFg4070yBF1NI1E2UTd0nYu7IycYUqq1UwYCZUyNkAHL/BEPzaeXble3fIIQgl5oeqR3DpXNpUsbFCuSuW6INmny0OLtJgft1Tgbg9tZgrEIHySakFK8cLeWbFvDAMWwB/z+LlACBTIJJDZwGijqXeJZYhD5W+5k= 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 Subject: [PATCH v2 10/20] job: call job_enter from job_user_pause Date: Mon, 1 Jun 2020 21:11:08 +0300 Message-Id: <20200601181118.579-11-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 51c0654e-d6b7-462d-f4a8-08d806573b34 X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2958; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YHEGSCjmfzASv5cvW1D5p8LLW4fRXxcEB6jy7rU+6g1svs4NAIwV5HxiZYsa0Z2ngLErN+58rAWz63tJb8kvuMPrerz61m42N122rlBDUGeUBrU2N3XEXm+umxCo28lH+XNF/UlPn3pNJcU6FtQ385s9p588nLICrGRnT62hfgK++g43XkkFy8RGl9clYhDUNyZCPJ1zLj2EguH3U1kTMvab/DTs3ba+nvCztD6JUo4SrqT1sLFyCB0M87GNG5noI4EemJJWxtxFLJygDz/r9iXE5hlVLad/P2I5Qt7FeZcgGD8LsE9KZs+JV0G2MPfHwieiBokDavw0rAqHk80ogMV11b+UZuS4Wd3L1bHm+dVYAPUID7pghwDLRGt4K2nH 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(4744005)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: j/NAzrZyCfr7z6LYzlZyM+Wfi0Sjq5NbaTldXxX9uQR4lKPQfyPJdhm1QRapDro7b1H85mjtPqI9dEvl6slGWw+93zRGddz7W7RQA9cVD/2vGT/jAvmSp1hAVbSoxdCLr1qcDfrc4qx82th2zhvmSU5dIwRZcSJrLtuckDQWEKe4PA188l1/gb6FqHJRYL1h9uQJKQhyutgCxai8XSJu8ZWMDCAxi2kCDgRK4mYcZTelljSMQPtvhcFbyjdhdK4FETO7mQUrMDVfLP+3OreyCHbqCRwhxEmMHRZZP4kwyYWBa2czhwakHne3hHeTIWIRQxdPxWIVtQxDnLUUL2G86zf9jI609ZDCFKWtc59WBD8F5fJYH39nRf8+MiVvf8NXL3IwHn/TL3YLzFqfGdeel1B+P8THn74yIOEV06RxAXodByLU3dDpZVPPVFXPROKVDhUvzNJtbkRUiz2maKioBYD3D+cjzEfJXM8KTrQNV8Q= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 51c0654e-d6b7-462d-f4a8-08d806573b34 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:40.0422 (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: BEdeZFG8AZA2MbU7aRk1ZBTQjKU9EddAfQ6WVr5jnyR1VcWZy52O+wA2EOOUIJFv/tWYjRXDErzXB1jLF1+xGM3rJ3WS0eHHJU9wXTqRUF4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.117; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:40 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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" If main job coroutine called job_yield (while some background process is in progress), we should give it a chance to call job_pause_point(). It will be used in backup, when moved on async block-copy. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- job.c | 1 + 1 file changed, 1 insertion(+) diff --git a/job.c b/job.c index 53be57a3a0..0a9510ece1 100644 --- a/job.c +++ b/job.c @@ -578,6 +578,7 @@ void job_user_pause(Job *job, Error **errp) } job->user_paused =3D true; job_pause(job); + job_enter(job); } =20 bool job_user_paused(Job *job) --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591035777; cv=pass; d=zohomail.com; s=zohoarc; b=iILJB22dM77Lznl/SWZeftldtwZFozmJpttOI4qhGfeukEKo08VnfI+fISyEqgyVibTTskgQI2g5PotYcZIg0jwq0tTd9ze7Bhv+LJFlNwT78TfNoZD4tfM4/sJTxNAok0ThZofFdLOxOKgFdyUMb1W2xIf9nthw4QB2LR2AvOE= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591035777; 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=iYkryG17z2qbi66UH5knwakQqhGFwVBWkY8Ljnt3fOQ=; b=T1ll1AVATNnusu7ZUlrhA24qk5LcpLS5SP+zFTcMiVgmOP66c8NKXLgC3rgN/8t2bQOzjiHjk7hd8C3ZgsQBVqe+pLjV6ZGelYxc9R1IOXG7m40jwJx60MjGv8g1oevlbCskOI11BqQ+4z423FqcWCJ+IvKWpVgs7q8NxV39yWQ= 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=none 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 1591035777809143.1524161476891; Mon, 1 Jun 2020 11:22:57 -0700 (PDT) Received: from localhost ([::1]:51082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfp5M-0002HP-Ev for importer@patchew.org; Mon, 01 Jun 2020 14:22:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfoub-0005CA-Lu; Mon, 01 Jun 2020 14:11:49 -0400 Received: from mail-eopbgr70093.outbound.protection.outlook.com ([40.107.7.93]:39047 helo=EUR04-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 1jfoua-00026c-Au; Mon, 01 Jun 2020 14:11:49 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:41 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:41 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KUtHHHgWe7wbYQckufP9irvLDMWUOIkYxj+qqdHaedF9NzYBueauLda22AjK39xX4OVFEahnTvittTO7P0nSwje8NBAjeN4MnnYbriNAzm2HOgddL/BL1TNJwrRyH1X6O5milcReO/Eyy5GxTggdoJfFfpNLbyoj/5fVu5iiz63RdicfSP0jbRsU1SJ4bfAV2r//vO6rVMKgV5Q3zew7vGqProSPqleBJ2yypHQuXP9+/qPLou8pldH9AXbl67vvGRfz6WR/hZx00uWsDiVqD49hPl+uTd7cjHHM8A6teD4u2fTyER7yQH6nID17TGgQD3lbSCiFmZ4EhkAWaYocJg== 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=iYkryG17z2qbi66UH5knwakQqhGFwVBWkY8Ljnt3fOQ=; b=haJHi3hFjl+b1wTnrEWzGFYAKCZfYJbZNHJBnNttYlNALvnoTWcv+kMOKlcdF3vX4L+75NGUEkcoP0QXOeYBEy4AHEnSsZfhRPehNaRlDZZ0UK8y2SvVeuRfr2kqYDl0m8Y1FxVvHGlT0laHy5+TalpeyX3EaWdTW73UjRLgsRNHtAm3RAWqXPb+ifRRfUCFLaHq/cMkVI4ipx98YYJUEJhURUYmfKOejEN/yXVdTPEseccUXJ5P9Z5UlC79I11RaL9KErfOWreVaqfow0yPW4bJg1RI/JTuWsW03XLLPnhmwrru/ULJUFLAbdORsjJBUr+YnQXJL89lxLIpeG5tUA== 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=iYkryG17z2qbi66UH5knwakQqhGFwVBWkY8Ljnt3fOQ=; b=jkRzF8JrRmmMEgKwmgItseY4a9tvLdKO5XIxGEhJm0XZuBlWbnoMiBHBxILE909BbMJ4XrLXV+QUpCvbH82y5+BJfgXRyHb9sJvQ/0deCQHFBRMo17g4Tk7K/6khkqelThYBdA63vYC5ye08kd8xbZnvy8VfcgVIqoh2QRpc1fI= 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 Subject: [PATCH v2 11/20] qapi: backup: add x-max-chunk and x-max-workers parameters Date: Mon, 1 Jun 2020 21:11:09 +0300 Message-Id: <20200601181118.579-12-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6a41eab4-ddbb-4391-858d-08d806573bc4 X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:923; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: h36Xtz5eXxd7VQ57+trMrTmiCxacQrrvN/nvrxoUtSjcoLtEqLcRFd5+a9IfIWdhPU+6MsiJ5cGLr1k0/z1uZ0Vo/fyOdevVI/hkdqaeS3BuQ/HUD1V36oCZerDh2t75zwFVW15CwEuKhrDMmU2ViyLcCsVHfF7n51q/RXSpflekTLXUYTzBGijNvuFgRYbmsH9P2sfC7q6T0IpuZC3lYVvby0NRxk3K+fVmjl/CDTzSOBJNDdZoskxISLlikoKPdY08IAOe+ex50I8EbKPm2SPBcRP6KVYG5jx+FcHCwudADW/cftqRqVeWThU8UkDDEanw283GegoCp0l9XZKLpSiXW4FOT8sBys7CEkIyUPgrIv2BoskQHzz0p+HMSEkQ 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: 8VOcVqeP9XlcCFqoVqJ6H44U04B1VlYlox+l05yL2nEeZBHUt/T8meQy9RpwN6D5c7Ldt43tE53Aa+tF2P587NVZAXotgKaBlt4M57IcCHUv6zDIEZfexeYMAuMAvUQ5LSgHryFbsH5PaRIIGWAqugnp3LBelsTG4eVkGAXRhuZFFFy+4l5NmMJbhcEhr90qDJFLsRPolIOpn5Dk7KVpSs7UZaW2HpWhJOqz9huLLJWYCmvfuZI5jnDbnfdnNsp/bzgOiazXUTpC9ljFSA0+KhthrURAOerrUbp506n4nMBoS33nuSsHf2rfzMm1GcvXMY1jrYpmKoPEaLPanJhOvI5enNaaNyOuWBMq2WXl5Ry7e+vHw31TGERoC4EOm2PQZNdbyWR6AEAjNI1F+bh+EVKaw3zPvrQG6Any0neTYRr9dSrHJPZSPYCH+kt67JQc5nr7DkDGalzgC+93OpOiG3Fq7r6tZ001mKj78XYdyYI= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a41eab4-ddbb-4391-858d-08d806573bc4 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:40.9065 (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: 3s6M3gYW+sAh5ngMya3903RwwALQ95A3qeZ90+IliZ9D/CjpW7fGF1cXv08e5F0gsaojzgZMc0LeRMoI7eqF4fOInGJtE6JX6moENTobLBs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.93; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:32 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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 parameters to configure future backup features. The patch doesn't introduce aio backup requests (so we actually have only one worker) neither requests larger than one cluster. Still, formally we satisfy these maximums anyway, so add the parameters now, to facilitate further patch which will really change backup job behavior. Options are added with x- prefixes, as the only use for them are some very conservative iotests which will be updated soon. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 9 ++++++++- include/block/block_int.h | 7 +++++++ block/backup.c | 21 +++++++++++++++++++++ block/replication.c | 2 +- blockdev.c | 5 +++++ 5 files changed, 42 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 0c7600e4ec..f4abcde34e 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1407,6 +1407,12 @@ # # @x-use-copy-range: use copy offloading if possible. Default true. (Since= 5.1) # +# @x-max-workers: maximum of parallel requests for static data backup. This +# doesn't influence copy-before-write operations. (Since: = 5.1) +# +# @x-max-chunk: maximum chunk length for static data backup. This doesn't +# influence copy-before-write operations. (Since: 5.1) +# # Note: @on-source-error and @on-target-error only affect background # I/O. If an error occurs during a guest write request, the device's # rerror/werror actions will be used. @@ -1421,7 +1427,8 @@ '*on-source-error': 'BlockdevOnError', '*on-target-error': 'BlockdevOnError', '*auto-finalize': 'bool', '*auto-dismiss': 'bool', - '*filter-node-name': 'str', '*x-use-copy-range': 'bool' } } + '*filter-node-name': 'str', '*x-use-copy-range': 'bool', + '*x-max-workers': 'int', '*x-max-chunk': 'int64' } } =20 ## # @DriveBackup: diff --git a/include/block/block_int.h b/include/block/block_int.h index 93b9b3bdc0..d93a170d37 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -1207,6 +1207,11 @@ void mirror_start(const char *job_id, BlockDriverSta= te *bs, * @sync_mode: What parts of the disk image should be copied to the destin= ation. * @sync_bitmap: The dirty bitmap if sync_mode is 'bitmap' or 'incremental' * @bitmap_mode: The bitmap synchronization policy to use. + * @max_workers: The limit for parallel requests for main backup loop. + * Must be >=3D 1. + * @max_chunk: The limit for one IO operation length in main backup loop. + * Must be not less than job cluster size or zero. Zero means = no + * specific limit. * @on_source_error: The action to take upon error reading from the source. * @on_target_error: The action to take upon error writing to the target. * @creation_flags: Flags that control the behavior of the Job lifetime. @@ -1226,6 +1231,8 @@ BlockJob *backup_job_create(const char *job_id, Block= DriverState *bs, bool compress, const char *filter_node_name, bool use_copy_range, + int max_workers, + int64_t max_chunk, BlockdevOnError on_source_error, BlockdevOnError on_target_error, int creation_flags, diff --git a/block/backup.c b/block/backup.c index 76847b4daf..ec2676abc2 100644 --- a/block/backup.c +++ b/block/backup.c @@ -46,6 +46,8 @@ typedef struct BackupBlockJob { uint64_t len; uint64_t bytes_read; int64_t cluster_size; + int max_workers; + int64_t max_chunk; =20 BlockCopyState *bcs; } BackupBlockJob; @@ -335,6 +337,8 @@ BlockJob *backup_job_create(const char *job_id, BlockDr= iverState *bs, bool compress, const char *filter_node_name, bool use_copy_range, + int max_workers, + int64_t max_chunk, BlockdevOnError on_source_error, BlockdevOnError on_target_error, int creation_flags, @@ -355,6 +359,16 @@ BlockJob *backup_job_create(const char *job_id, BlockD= riverState *bs, assert(sync_mode !=3D MIRROR_SYNC_MODE_INCREMENTAL); assert(sync_bitmap || sync_mode !=3D MIRROR_SYNC_MODE_BITMAP); =20 + if (max_workers < 1) { + error_setg(errp, "At least one worker needed"); + return NULL; + } + + if (max_chunk < 0) { + error_setg(errp, "max-chunk is negative"); + return NULL; + } + if (bs =3D=3D target) { error_setg(errp, "Source and target cannot be the same"); return NULL; @@ -422,6 +436,11 @@ BlockJob *backup_job_create(const char *job_id, BlockD= riverState *bs, if (cluster_size < 0) { goto error; } + if (max_chunk && max_chunk < cluster_size) { + error_setg(errp, "Required max-chunk (%" PRIi64") is less than bac= kup " + "cluster size (%" PRIi64 ")", max_chunk, cluster_size); + return NULL; + } =20 /* * If source is in backing chain of target assume that target is going= to be @@ -465,6 +484,8 @@ BlockJob *backup_job_create(const char *job_id, BlockDr= iverState *bs, job->bcs =3D bcs; job->cluster_size =3D cluster_size; job->len =3D len; + job->max_workers =3D max_workers; + job->max_chunk =3D max_chunk; =20 block_copy_set_progress_callback(bcs, backup_progress_bytes_callback, = job); block_copy_set_progress_meter(bcs, &job->common.job.progress); diff --git a/block/replication.c b/block/replication.c index 25987eab0f..a9ee82db80 100644 --- a/block/replication.c +++ b/block/replication.c @@ -563,7 +563,7 @@ static void replication_start(ReplicationState *rs, Rep= licationMode mode, s->backup_job =3D backup_job_create( NULL, s->secondary_disk->bs, s->hidden_dis= k->bs, 0, MIRROR_SYNC_MODE_NONE, NULL, 0, false, = NULL, - true, + true, 0, 0, BLOCKDEV_ON_ERROR_REPORT, BLOCKDEV_ON_ERROR_REPORT, JOB_INTERNAL, backup_job_completed, bs, NULL, &local_err= ); diff --git a/blockdev.c b/blockdev.c index 28145afe7d..cf068d20fa 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2743,6 +2743,9 @@ static BlockJob *do_backup_common(BackupCommon *backu= p, if (!backup->has_compress) { backup->compress =3D false; } + if (!backup->has_x_max_workers) { + backup->x_max_workers =3D 64; + } =20 if ((backup->sync =3D=3D MIRROR_SYNC_MODE_BITMAP) || (backup->sync =3D=3D MIRROR_SYNC_MODE_INCREMENTAL)) { @@ -2822,6 +2825,8 @@ static BlockJob *do_backup_common(BackupCommon *backu= p, backup->compress, backup->filter_node_name, backup->x_use_copy_range, + backup->x_max_workers, + backup->x_max_chunk, backup->on_source_error, backup->on_target_error, job_flags, NULL, NULL, txn, errp); --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591035438; cv=pass; d=zohomail.com; s=zohoarc; b=TW0QUcjfcnEkq/Rolw7ZMTY4Rr8PaJkOowZIhC1ayVMyqh0jgAl3O9YRa9C9+umfVGDbf/7bnnR53nK9nAY2YEtYMswPs5GcosYQ0e8Vn8T/5Um7lErSiLjQHYbPnUgumog3nwsH4+jszDuEzgYO4aRhRuPora+eQ1W99OivUMs= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591035438; 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=jBfmbhmk/W92+2NFh6AEO3VnEZYVU6jp2wHuwN3JFeQ=; b=YFEM83mGM9gmZb4aQ+4aIszlRjaSvG4CMgwRqBPYwT8F2N8MP6Twj+bV7eFfL/f8eRJG8QW6V9JWo5758qkPd2N6LCl+eE4+oYPYW2UoNuaMYoA2rb6uOm0Kkl28Voc2e4u3ri8B1KGCKpWTAwhWD3DbMGwOBt9n1TFpQTH7s/w= 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=none 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 1591035438563241.6719221093732; Mon, 1 Jun 2020 11:17:18 -0700 (PDT) Received: from localhost ([::1]:33652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfozt-00039P-6I for importer@patchew.org; Mon, 01 Jun 2020 14:17:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfoub-0005Ch-UA; Mon, 01 Jun 2020 14:11:49 -0400 Received: from mail-eopbgr70117.outbound.protection.outlook.com ([40.107.7.117]:10211 helo=EUR04-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 1jfoua-00027N-Vj; Mon, 01 Jun 2020 14:11:49 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:41 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:41 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HtF02i3DTLkYhaqC4/mlY5xoctweB4sluvZzjP6lZbw6kv2L1OXa2T2mr5DQuiOUEMIgOnJ6DmhtADVUT2zaxjqatJ9grqhvkMsufmm9+0pYiGYulzqZHUFG5i85ikyuRV7xTbzPgteLxXbz0QnpJ7Qoy4d5i9DnIlma1pVB0UmoTMky02QB2moLxE7864cgMZXO/ckx6TQede12Fv/YKcS9bYzZo44by3axml5e7MuR0Ph88itVdVqkcRy/EGqL6knwcJ7eoqNG8KndnwLY2G60aWLNSMsEwMaIucSQ1goLq4TK7eiupGWRIkglefoMtRzfhQQg0GTCD5p+zpNquA== 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=jBfmbhmk/W92+2NFh6AEO3VnEZYVU6jp2wHuwN3JFeQ=; b=EnwnPjlGRoJdtLyLbtOPZFt19nogGYL+kJ2pVX3hJmPkpl786SV7KKKis4DAVIRQUOWS/HzL56BxtoYjfh8nTRiclG7wwidHvGUUeOkg17GneZLQGF5tiWhVd+9zgLKzV5XkLEV8xoN1hkTVbEl5/FiYGcEyZ5UPmL3WiTI6nFllLwHCVRwH860vLagVX9SdgBco/+JE8ifg1LFyNSpst0OnN7YE4JmTxHJczo/htw+ssEph/edQCZ/edlJxVpUWW/ME6+V+0zokeVTJNGeKBcUSyT+6RNHn4Mhs4+eNt07DtgRy92TdgIB+LtfjIYMgrcsQqKwcD4aJd97mSPLB6w== 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=jBfmbhmk/W92+2NFh6AEO3VnEZYVU6jp2wHuwN3JFeQ=; b=c0hOJmHqQz5Beek7fPoZrSn82q8knIknPVqexMmOsI/4C6BL5xG6mgy+MrvMucX4WzNmYXUcx8NBxbTzarKfXu4aGGyHw6REIEAgn32LIRntkbLxKZ3JFFPx6fL8r/IP9pkWRQlXK3hn8EJK+QP/pTV8kLBq8ifjZ4knCV8pb0E= 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 Subject: [PATCH v2 12/20] iotests: 56: prepare for backup over block-copy Date: Mon, 1 Jun 2020 21:11:10 +0300 Message-Id: <20200601181118.579-13-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d0d08185-a529-4c15-19dc-08d806573c59 X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NtbfqwliqLp8+2z5ac5ppInbXmM14Cs5gyPZPLn8TL1q+zg25mVZs4GGwsb7ZuHO5+U0s3fZme6D1R81nAHKLR7aE/TS0BlZFrlzT+exPGq84s12862QaoVuo2bpFEZDEIqWcYgnYOshcCAhcZ+1hBxMOE025qcozcQG0XC82WUNDzsteGvCrOnSi9v1RDFVKBTgDxBu93Xrf5EbVpd8+gtSXl+BRoaMT/TdciCAVdSqewtB9+Manwduj+rI+jbVxHdS9nwUiFDw1kADenbgkq2MRxDX+c8/vh6JO995OJrZ27Ns293JosYbVSjP9i9K1nup3RiHuD5H5KDjzgZevG9/NYaB+fuey3fYmhbwr0Xpake5Is9G7bLyTYmrGzfg 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: /QGWQ4bRFzDgcp/iTLWpmssjk2brAMxMgJgFaw9aynWn9MGfsPJtkuHIACFdimF5Oy43NCaqm0ulaeMboEmENRSTYIBTf/QwyasvPDyHsakWVMk64JELHD1yogdHPf6FFKIyX3C8BnMYzByP1cElh/6O4QiS4u/9Z4OQw2zV8LB98GvWO1smizZN0OXWroaBeg1vuPlYgCXRDsKMsfShyBQYzj5LJ5Tc/mIOuQzVvK5FrIIUCTCsz/tVwN+dV9ZPky8lR7qsZKIf2SAXvyMwhW9Stw4a6g6IR4bvjcSPo1h3RcT+r6d+zE412vpdfCx0tCwzdtwcdN89LfGE/wLqOzEWoJskmgwGULO/JF6A8YR5XuVr+Oy0JQmLp/AaG7EQTKdkOdI7OTgDH+33gyjQTkUySieA/Ajj7xl/Btx2HdgXbNaGDyACxhsc3tV/Fu/uKev6zf3x1SAb6h9AqaduCewQDqCKqpDyQY+bWY01WRo= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0d08185-a529-4c15-19dc-08d806573c59 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:41.8384 (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: Hbze60JTLb5HpZH3G+xcRHhmL5RiHTtiQYF8DRsyMCwj331L3eNTlqdqeiJ9mVDzJ3KgHSCMjTMVql0KcswAMbz8WwfKVPkpdEOhOcT8fe4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.117; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:40 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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" After introducing parallel async copy requests instead of plain cluster-by-cluster copying loop, we'll have to wait for paused status, as we need to wait for several parallel request. So, let's gently wait instead of just asserting that job already paused. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/056 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/056 b/tests/qemu-iotests/056 index f73fc74457..2ced356a43 100755 --- a/tests/qemu-iotests/056 +++ b/tests/qemu-iotests/056 @@ -306,8 +306,12 @@ class BackupTest(iotests.QMPTestCase): event =3D self.vm.event_wait(name=3D"BLOCK_JOB_ERROR", match=3D{'data': {'device': 'drive0'}}) self.assertNotEqual(event, None) - # OK, job should be wedged - res =3D self.vm.qmp('query-block-jobs') + # OK, job should pause, but it can't do it immediately, as it can't + # cancel other parallel requests (which didn't fail) + while True: + res =3D self.vm.qmp('query-block-jobs') + if res['return'][0]['status'] =3D=3D 'paused': + break self.assert_qmp(res, 'return[0]/status', 'paused') res =3D self.vm.qmp('block-job-dismiss', id=3D'drive0') self.assert_qmp(res, 'error/desc', --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591035651; cv=pass; d=zohomail.com; s=zohoarc; b=A7SAd0pOOgjXWEVTlpiIGidQ+sWcRZYeQC8iR6kWMq9MDQ6kOWp1H62xFKTzy3vdRy+KHfekdofvkvDiLiufujlTAu+ra2CpOixQuVTcrisBFQ2ZJoJfkIEV41WkI41jEr6sbWkiBmIaHkzDYa6YH+GQ26RJqCtduUxytbj0Tqw= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591035651; 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=h82TpyYMbuKPfS8sjUB/b//yqwwG7Jeo3MhfNUlVMK8=; b=Ss+/4/m1QvM2vmigrDLGIv6PuZ5NJKFVmdFc4gV/zFURs4vcsb2Qicct/+WG+Q6oMKqJmADUHRYWD+/d8pKM32O8rHBKp6AgVlKHHs7GMjZGTfhV60f+IWFkdo5K2oIA9MhbFWFjkHig9eQK1tGcC+zZOKldnlKGZtg8NCm1u7c= 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=none 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 1591035651170151.79451254294258; Mon, 1 Jun 2020 11:20:51 -0700 (PDT) Received: from localhost ([::1]:42868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfp3J-0007Bo-O0 for importer@patchew.org; Mon, 01 Jun 2020 14:20:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfoud-0005GD-5j; Mon, 01 Jun 2020 14:11:51 -0400 Received: from mail-eopbgr70093.outbound.protection.outlook.com ([40.107.7.93]:39047 helo=EUR04-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 1jfouc-00026c-8N; Mon, 01 Jun 2020 14:11:50 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:43 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:42 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YaVEGV1Q0G8BQ9Clj0TCg/RFljGm8XjUzAluOrE/31byWEq6WfDQnhKFGvoTIS0xcrrZ+ep42jZOgGTqgMg7SB9ZnkRF0x0rHjLeXvSNhQqRz+EcuxUmn2kS4aneZajjUBR+npkZoJDOyMn0GbqBP1vdVaMEJJTZZJHEbADvwcfkVo89f6di0goN8G4orEM6OJ8nampPGB7+PeZ0kyFOjjB+wV7Cz+M7k7CYu9dNXQUl1Zsuyiton7COut6ULSkrWkGEPalZAaaC76ulM9xTlj6cGcxoitOPqQ74DnEj9921jf8Qow6uNQciSafU+EbvT39+8erLULM4xn6bLUOvug== 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=h82TpyYMbuKPfS8sjUB/b//yqwwG7Jeo3MhfNUlVMK8=; b=Tkii+hwrAkAx5luQyWZ/pYv0PP8mivvFpH/AFsD/G8BGMtR6DnohqRS2UelE8l51r+qLhnf1w87NnINRWjPLEK+Y7/EJPcceaxEko3nru8JAQy05uz16c+cz0uAZ+963e3JHnTBKGUsCwdwZIISpt4h2c+g83WEkQGSv5CeQEqJqDyxFRfKPCufSJaigve7iEzUO0v+Cgnkc/Ypet6ZB0aek/TBmjfIXybulwy8RApOL8EXDjPBSmp1wuI3TDi8uvbb2hWuuN3B3kkggAKSWywYKXdZqmuXsA1QXGPoC/uBqYh0nHtfWsW3hA31UsxDgbzicShrqk2lI0F5vPxjHXQ== 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=h82TpyYMbuKPfS8sjUB/b//yqwwG7Jeo3MhfNUlVMK8=; b=Ub44yxjRf2P1ehJMehu+bZp86dF9PkJHYS2Qh2bMnN+ZBiSPWAQxTnF8IbXwqzofzOFpzCzavTYWXrsy/ek+pK1SfJ0L2nj+Db5kfTQNqMR55qXTdFJaEqVbTnCT3/JQ/+JPNuWDKZ8lwU0+ndyj9dZb0gb5e9uTft0tVr6JhhU= 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 Subject: [PATCH v2 13/20] iotests: 129: prepare for backup over block-copy Date: Mon, 1 Jun 2020 21:11:11 +0300 Message-Id: <20200601181118.579-14-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f870c227-7dc6-4e9e-bdaa-08d806573cdc X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:88; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BvaCRRmYmZXMm6uf97o5JXICcAwRP9OY0dTEK1ZoCGhIjxaIh1vm2NNIMpo/HwtCpFG7ig/ZtikGajTjmMsahynvkPVM/EBOxbFBsqZ4DJS+wS8kOfunRm/JUKkcdZVVu0D2qivHSECFjfEPaJPSFp0krrfqPwX3KcaV4ViI8ZDvxsfoADIXwoElD2ALqixfEA21UABDzs/cz2SXsBc/BRuFZUVb26EEHVZveONeWByqRSxoM3ZH0VL4i9zKeCVYSDsYreW8mqY5aOC/XGg66ASbtpl/HOyQ888orG3cwPuplOIQ/SuieMJ2t8osw80saP4euBYZD6K/REI0EAthiGo+27/L+CI+6aStbdrFAO6DKSrVdytU2kHlGzgFU04S 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(4744005)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: r/mhPF3G0ZxdZwmRikjRbhmCoATTqOoZIvXOWEFW1EvB+UvBJ3RMFnF1hoPLqPujnte2Q2VDDRuEON69wYNxWrzAUibpO5nwEnT6MC8M8B3aZgxFFgaDF1mz0cD+y2I2BXrwFBzNUcCkMQDonl1V13aAvreURd6dVU1AoHvlCSHW0u52H9iw0AckUOm+bnhGKrOmvRvR0r8f/2wfJl/7IaI89pBCvx0xcd1R5qkdUIYKuC17hdi8KOVrDaHNvclpv/fqJAGB30J1jO07O5NhMDRcgV2c0fH0vQL8wzyYbXMEYRO5YxwixC555Jo68x68J1jooVBN4FwOebKWmRceg3nw9+LabK5WzrcXU3ds+UrMjv1OnHmYzZMVoKwr7AMZIDppXGEZYyUI3oXi3w1RC4zJ+tiVVkUlFDRGrK1H6tHCMa+Hv7V0OzRoFpitTatzKRtK2pfZlOzJFdG8tCnsAbIdt45LJfpSy0B6WgazE0g= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f870c227-7dc6-4e9e-bdaa-08d806573cdc X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:42.7260 (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: b4R78oB6xYDLQdmo4RIeUohcK4deBes/iiD0qhYcmlPjL/Aki4Zar1XHXGlDGmlx8jWMXsUcDmR9yutgbcCAHIOYoKfklmytLfdXJHJhGzk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.93; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:32 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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" After introducing parallel async copy requests instead of plain cluster-by-cluster copying loop, backup job may finish earlier than final assertion in do_test_stop. Let's require slow backup explicitly by specifying speed parameter. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/129 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129 index 4db5eca441..bca56b589d 100755 --- a/tests/qemu-iotests/129 +++ b/tests/qemu-iotests/129 @@ -76,7 +76,7 @@ class TestStopWithBlockJob(iotests.QMPTestCase): def test_drive_backup(self): self.do_test_stop("drive-backup", device=3D"drive0", target=3Dself.target_img, - sync=3D"full") + sync=3D"full", speed=3D1024) =20 def test_block_commit(self): self.do_test_stop("block-commit", device=3D"drive0") --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591035871; cv=pass; d=zohomail.com; s=zohoarc; b=dwDgf/uv2EnNA6uKu9xgtYLYE1lUdQo2jo3NK/h0WbtxP//rcDNjRV7+jUeHjxmapCChfC5ydZlvclPD6yLnsfYm3Lh7sH/KWCMDq84r1G6LaBn0Z7UbQybSWG4t2SRohWIp9KhqMXf9rJwPbbt7j/vM5mKwZ+/mMyTUE+/x5Ec= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591035871; 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=A8yqqP4TiNxeZhmnF2MxKR+ffrvUBh0d/iUcko9ddiw=; b=mg/tFDxikzZvT0eVHMumuB9/9yU5d4BfennimuTOr94cqiTRQv9rFAr7Geok+1dYakPEUoPNnoNyvDXgus4gXcdJGUWiZw7UN+Q2IYJ0+YiU57aJMTgoprzOyL7/wW6e6Dp8CB9XZp732nJSNH+9M1YuAfKFVC1OyJICO2HRdQU= 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=none 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 159103587142873.40956301790857; Mon, 1 Jun 2020 11:24:31 -0700 (PDT) Received: from localhost ([::1]:57312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfp6s-0004vl-6J for importer@patchew.org; Mon, 01 Jun 2020 14:24:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfoud-0005HJ-Hf; Mon, 01 Jun 2020 14:11:51 -0400 Received: from mail-eopbgr70117.outbound.protection.outlook.com ([40.107.7.117]:10211 helo=EUR04-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 1jfouc-00027N-He; Mon, 01 Jun 2020 14:11:51 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:43 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:43 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YUPxsbTaaPkc7uefdq/o9XGJ/J69Yd1chnPMn9b8B5DADsqlqotnX9IaPXoER78lFNVzpb8jFGxee4LYv2lv2kHXTO5CFywJMEKuEZ2HCFgfzs/7u+Cvwwp+ZokpV/3gW7G+5KbfmFN4S8IUojO8tmPyMMgMESz5uAHzmNKz/pkrCBFeoWbka8sD2bF6WAosQLbRB2VOgXZiYn6HsaGt3Ri8WdfSQmGyiiR1QrnMQNuSfjB6SInzjlQKVkRZb2Yvh59aB1jSmXpwYhZRJVH3usppImRs4f5WL7re+EN6pAa7D3NlwouUS3HyMPwHhvhGckp3+fqAR16UETSj7rkK9Q== 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=A8yqqP4TiNxeZhmnF2MxKR+ffrvUBh0d/iUcko9ddiw=; b=IREJydDqH6/G6EyowtjFwFaEHQItoxHDf/r7km9WRVNyzPHm70qfiIAlqtdkFULKD7y4nCJ/qPHPspK4wX2MhNzo3UJwr/kwxMCocXBQymzCIGXwSQ0g92ap8K3LXkLxEtbC5k1PQJGxjWMbqqKI31VyMuOMa3sD1CNuCP5C/wpY1nXijrmAtMk/50XUUOtmRJEBIsDHfY3FQGHKdtwifljNDzqhSAazBZvJkKZX5/O7kRz2XofbsYJ7dh6Gg+a/fez9hFwD9DMJjRWAvSayn1/1ufWYB/PJiJrI/P9ZQkRbNPJ/sMcAONTQESm/qtqhnFOBPdKXrG3x5SeiFu8CgQ== 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=A8yqqP4TiNxeZhmnF2MxKR+ffrvUBh0d/iUcko9ddiw=; b=H72/atmCndqXDZyKnuX1VwWxiQMYy7eH40YkVJR6Eug+zoJNZ3DxUsx8nrM59zphCzs2MSLSeNaT7kgvIKtwfp8JCBXFSjnylLGHuqBqeGLyysfpFX2R7ftKQmluIDXuEG73/BssUXqmraYVyLszVbEl/z556Z0U9vVNhKq4II8= 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 Subject: [PATCH v2 14/20] iotests: 185: prepare for backup over block-copy Date: Mon, 1 Jun 2020 21:11:12 +0300 Message-Id: <20200601181118.579-15-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e699ce92-1544-4364-376b-08d806573d61 X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1fkkVK6PM5UL1GdbnpD1hOMWlXc4A1wGv44ZshYjAgmgO9jVz4zWyGvV0VuABFLzkIvyLoEeS9L7sAlsK7D6K/GdIE14nUVBT6yjPnhbjfsp0WjY+ZcZ7SJIb2IZlnN9a5yZ5w9BuC36ruea6HKo5RgzSLDO0JcTqh40nYjyHw8RqZQsiNBjml4M5W9QEqYLKdJoorpR+wQwhLYs5PLW+OPDqBDWmjw61snRVaSZ6KWXzc12r/kNwWg8PWElhI9cMkmWvjfBtuaX5lM/8S3xymf1bPJ61S4g/9PbfsBH0XEzEDyMj1faQcUKIwJO0BbTG/ynv6EN9FnbmUWY8jPpMIe85TTqzO8FI7Gf/3wwRlIcYFrZiq1iKB1KA0c/CDQ0 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: cciS4roC2dZSbyIYdG0iaSJId0TNts3z/44CXjTLOMWVj2YdvvuO0o3UZb5capplItzmI5oaI1EP8SPytz8VtSULSxx/iv9Se965mTFl/Uaob5nAom0zNJ3T+jhxjOLH/imNLOuX5boCs4aq1SFDmyVEETIwI3cjSyiURU3Mwh0GeQ7Sa7jBZlVDBIkwNjypvdQyL5vZMePbjFlpmvp3XqesJBSaYSBIPLLbYZHimahf2uHgVnqs3f7TJN8DU20gDG9fbcMeqyn13mlvrX9RdbJBroHcw8maLzYcyofZScB202vnIAYLXh8FxgUoFfYMk48gOLIPr6b25Q2NNfFUcheU8obTDC8q3VfSMP/kvOpNJjxFuRAbDnimTJxPQoZQp1RhXGmIBESZTS9okeBfwrm7PK/YnUjLdX9ZO6/mRcf7PXs+6saa/UsJ00KEEEO3zarM3/N2hdT44ywjAjcMAxZlJfuPbbWVa9Jvf4HPy1Y= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e699ce92-1544-4364-376b-08d806573d61 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:43.6001 (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: XNdiSoPyKSepzmKErvkjpK3LB3WcMxmSHKfsbbVyPdXfg27z4wOrRckGoIjhUu5QjEK7LzQmY6/q/Lk6CJ6Al4KKjpntSwIqIsNDKGUfyTg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.117; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:40 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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" The further change of moving backup to be a on block-copy call will make copying chunk-size and cluster-size a separate things. So, even with 64k cluster sized qcow2 image, default chunk would be 1M. 185 test however assumes, that with speed limited to 64K, one iteration would result in offset=3D64K. It will change, as first iteration would result in offset=3D1M independently of speed. So, let's explicitly specify, what test wants: set max-chunk to 64K, so that one iteration is 64K. Note, that we don't need to limit max-workers, as block-copy rate limitator will handle the situation and wouldn't start new workers when speed limit is obviously reached. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/185 | 3 ++- tests/qemu-iotests/185.out | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/185 b/tests/qemu-iotests/185 index fd5e6ebe11..6afb3fc82f 100755 --- a/tests/qemu-iotests/185 +++ b/tests/qemu-iotests/185 @@ -182,7 +182,8 @@ _send_qemu_cmd $h \ 'target': '$TEST_IMG.copy', 'format': '$IMGFMT', 'sync': 'full', - 'speed': 65536 } }" \ + 'speed': 65536, + 'x-max-chunk': 65536 } }" \ "return" =20 # If we don't sleep here 'quit' command races with disk I/O diff --git a/tests/qemu-iotests/185.out b/tests/qemu-iotests/185.out index ac5ab16bc8..5232647972 100644 --- a/tests/qemu-iotests/185.out +++ b/tests/qemu-iotests/185.out @@ -61,7 +61,7 @@ Formatting 'TEST_DIR/t.qcow2.copy', fmt=3Dqcow2 size=3D67= 108864 cluster_size=3D65536 l =20 { 'execute': 'qmp_capabilities' } {"return": {}} -{ 'execute': 'drive-backup', 'arguments': { 'device': 'disk', 'target': 'T= EST_DIR/t.IMGFMT.copy', 'format': 'IMGFMT', 'sync': 'full', 'speed': 65536 = } } +{ 'execute': 'drive-backup', 'arguments': { 'device': 'disk', 'target': 'T= EST_DIR/t.IMGFMT.copy', 'format': 'IMGFMT', 'sync': 'full', 'speed': 65536,= 'x-max-chunk': 65536 } } Formatting 'TEST_DIR/t.qcow2.copy', fmt=3Dqcow2 size=3D67108864 cluster_si= ze=3D65536 lazy_refcounts=3Doff refcount_bits=3D16 compression_type=3Dzlib {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "disk"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event"= : "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591035849; cv=pass; d=zohomail.com; s=zohoarc; b=dH0QnDZw970H6xdBcmEfHVkl491pwTuMiMQCRzLH+6tY3m89h4oClwbSgdqfCXApgvAdZgh6abYzlcoBOrkaYCCk46fUYyfagUI00CGZy1kEXndfc+tH0X8fDCjvK80PJFG/EGKoVIQ/9kkurumu8mA8+7yuYqFDTqDwmm2GsRs= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591035849; 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=CEmTw/MGWdYe/BXRntGy32gBtnGzhZ0d0m59CkgT4Ts=; b=JMFvWrvs0ouhHXnMagbCgmvKp5qfiJdeDJs8K6IQ7EodgxAxXRfx588uwnbBv//Q5ruWlBjcqv60EB7TGknwuJ+TBp5SZi4z+X0Z/mAHq/RCwepuvb/w+OxS6UAxqUYOemW55zdZo/d5vobDRFw9FJZuN61LVcKQgTmPuALsW+M= 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=none 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 1591035849607360.2317190440665; Mon, 1 Jun 2020 11:24:09 -0700 (PDT) Received: from localhost ([::1]:55726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfp6W-0004Ik-A1 for importer@patchew.org; Mon, 01 Jun 2020 14:24:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfouf-0005LM-4j; Mon, 01 Jun 2020 14:11:53 -0400 Received: from mail-eopbgr70093.outbound.protection.outlook.com ([40.107.7.93]:39047 helo=EUR04-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 1jfoud-00026c-Q2; Mon, 01 Jun 2020 14:11:52 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:44 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:44 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i6q7eIRtXjm6FX5PzSVDcqv/lPuSoLtoPO+2eoTwj0gOd6JtvLGkPbxEkVwVP3kKh54aswpuNSKY6LC/JdlMqJKADJFwMYFEKJaFe0A9SKN//DnPrg4oFF9+Pnl6YK8DyEb2xFJi/hUojz3s12lUHUtyY26z1ovAouA0tHub53xNHqF/DLDY9Hud7Gxq5pryOMkTfFWGUFNHrzbU6KRJJIix3c2rn+1H+kEBkKIiuZLttB0suIUxZj/QFmdu5+JBxNhbZaURDXIYpShpJgd5kKjn3DBC1veyTVRL5BxQR7Wt+DBt8A82zdjl6oDQZohiXY6esQbSDZ8E8KMl34mKqw== 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=CEmTw/MGWdYe/BXRntGy32gBtnGzhZ0d0m59CkgT4Ts=; b=NUuDjIwO3k2gEKahMksBpOADo2BOWsXWS9ut/CsujgzY/1oE1+3iQSmlY2tpkg7z7dMsdtUTf21ULKO/b6TGamW3CaU9Csr98YoiMgt2bKDfsAJ4qmM59L4TJHmAQrrjr0vP/4c3E83suRhK/3DkgRux0hRwEkmXRY7U/PNDwF31u87Lm6CO+4WY/R4l4TczXTYa5iif0KFBntVhIundgQb89CWkAliCjAUB5T8wOPpKdTm3JZlBVeUk09M0rZnxWVznUOiEkX79PvisQ8YJlbOhSfS9H61SmY2PXgnAMwTwXZpI4XeWPMCKZLO2FFYOJNZBb0ZWd0DICnx9UvhB1g== 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=CEmTw/MGWdYe/BXRntGy32gBtnGzhZ0d0m59CkgT4Ts=; b=ZHdk2FquOqS7MNLAZe0fKZT6CfEWZXyrlite7n/rdPIVmWc+iLaAbFxXYltr4PxY8boi0uhe+R6/gWCA9Yc8y9tLJZxlEHc2J2W6Du60bNwchL2EKe7eYRry8echHBvf1lYXlJVCz97vKM9NMPhDscRtrnNTZO5hSUJsn7AzpHM= 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 Subject: [PATCH v2 15/20] iotests: 219: prepare for backup over block-copy Date: Mon, 1 Jun 2020 21:11:13 +0300 Message-Id: <20200601181118.579-16-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 591ccf68-4fbc-4d3b-d80c-08d806573de5 X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RxQmX3/121rD/onmRuckNFR00ifDBFkYDkccieMhQhBpl9szQV8QjRBgDAB1qoomkW1eAtVWaRKWdUA7iAxY5uItn1saGfqRwQRE0tbYvqFKSSis8TRnRpNKeF6Ik3mBV8n+7nMT6mUqqDCJrJa40Gbflp0G6ITn1mf5/Buyhrdu8PfNB6we0sjWwBGMi6cvt3806ZBXaFiV7ica/WtMDD5HzJRM3c6HPxrSsbmA+ObGIxYnS7HBvhvMsBHJYSjuv6zSTL5iA/kIBRCkS61ln2XhsXltyRTu0sakfqHCK+WBktV0FC2vqfdIDpsxd3/v8iumSyR9N+Nn65Yk9BeBzTEpJIcCI5F7snRAFIcVTbV6m4BTnLDEX2qGQ1VT9ocG 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: S0JYWNkhnxplrMjSC/9LZeMSRLrv6yD36TyeZqnryNl9xlyEWM2Czw6l/Hn0tvpjY5KcaVjRlRgfFCCnydb0ZV5813+tIbHAMaEkUlSY9CCbLA/GtTvxpuLFrJxlIfM7pT7WDrkZcu9hRwCV2lbhAD63779qCGEfUPfxv9cTWZSWQGXxFL3Ub4mfZAdd1/8Si7FKmSYOGBtACyKm/VhaNl/Hq8sGJfo/WBqHH6fSMunwWydAUx/5zBUJQnYbn7Zh+o64WR/UHLaaZqs4sRC5nLQwtv4/sGHJKwwDuIBOyy7sraNKriBkoR0p5ZkRuIJEYm27Sepzvu/HuDBx43Cosh4KaSDzNWDL+DXhD4IkzjXPRIPNbCbumrk7PGH44Q8d6mTHOr9Msnmx1uFO7OQVUwt5fmMBNJrg3aZvqsyDOzGPEMzMr1jAEeL+RNfRiREHFCatRU4HPqaM69WM1EYTu1gGEsRt0iDrfBbDe80iS9A= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 591ccf68-4fbc-4d3b-d80c-08d806573de5 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:44.4763 (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: NlLPgy5hrjVNEhq8+tmzmusXQT3O2GJpeN/fG8IAnZI+22tTRarpNOr6ZWzaf+tMvZLZ9BQ5kAfhJy4WNqAZu/Lf2E9Fk0LuWIOXaA1qcpk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.93; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:32 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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" The further change of moving backup to be a on block-copy call will make copying chunk-size and cluster-size a separate things. So, even with 64k cluster sized qcow2 image, default chunk would be 1M. Test 219 depends on specified chunk-size. Update it for explicit chunk-size for backup as for mirror. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/219 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/219 b/tests/qemu-iotests/219 index db272c5249..2bbed28f39 100755 --- a/tests/qemu-iotests/219 +++ b/tests/qemu-iotests/219 @@ -203,13 +203,13 @@ with iotests.FilePath('disk.img') as disk_path, \ # but related to this also automatic state transitions like job # completion), but still get pause points often enough to avoid making= this # test very slow, it's important to have the right ratio between speed= and - # buf_size. + # copy-chunk-size. # - # For backup, buf_size is hard-coded to the source image cluster size = (64k), - # so we'll pick the same for mirror. The slice time, i.e. the granular= ity - # of the rate limiting is 100ms. With a speed of 256k per second, we c= an - # get four pause points per second. This gives us 250ms per iteration, - # which should be enough to stay deterministic. + # Chose 64k copy-chunk-size both for mirror (by buf_size) and backup (= by + # x-max-chunk). The slice time, i.e. the granularity of the rate limit= ing + # is 100ms. With a speed of 256k per second, we can get four pause poi= nts + # per second. This gives us 250ms per iteration, which should be enoug= h to + # stay deterministic. =20 test_job_lifecycle(vm, 'drive-mirror', has_ready=3DTrue, job_args=3D{ 'device': 'drive0-node', @@ -226,6 +226,7 @@ with iotests.FilePath('disk.img') as disk_path, \ 'target': copy_path, 'sync': 'full', 'speed': 262144, + 'x-max-chunk': 65536, 'auto-finalize': auto_finalize, 'auto-dismiss': auto_dismiss, }) --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591035939; cv=pass; d=zohomail.com; s=zohoarc; b=YBtj8aWkrR7goUHtmN7UQGRbZtSp1hq8u+kmlJoLJOqPaDiRIC16p58CewqhiVN+WtUv1IUxqPD/qOpqBeM9ZH5B6/ousnGfDmN4uywjWq3mhUblFPP+fGlQUVqYA48Z5k7TX+cO3EPcU1GT+cCysCdkozhj7XPF+KSBRUZb4Cc= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591035939; 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=b7heCSiWS3Z6KECmC2Nkfy1IHKACc9eMgh9EbV31/Mk=; b=jDjcl4rU8J0cL9JlgXPfrdB0Ehx6d3tKJd8GeqTosB8+rrDgSqKFUBCdaunSudC6iJT18oEnHIPK6o7KVLol+sBD2qQGUEMWuhbe6GhcUvQd04n60OE2C2kJulqK4udOM1uC7B9j10+iA0yuIDTuVakcN0CkTDVYVIGTaXd0N7M= 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=none 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 1591035939439441.3010584750408; Mon, 1 Jun 2020 11:25:39 -0700 (PDT) Received: from localhost ([::1]:60768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfp7x-0006LU-O4 for importer@patchew.org; Mon, 01 Jun 2020 14:25:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfouo-0005aT-0V; Mon, 01 Jun 2020 14:12:02 -0400 Received: from mail-eopbgr70117.outbound.protection.outlook.com ([40.107.7.117]:10211 helo=EUR04-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 1jfouh-00027N-T0; Mon, 01 Jun 2020 14:12:01 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:45 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:45 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dtsRH3ax1oH9BURRDzPkBTPpHROq/7Ccs0DpeebvUqMLOUUp+RkZt9kkeQtk6UCAtegCtaH8vp7YwdKctcn2GliLvCDV/67fqnW4khCOUG0JX2C+GKe+PAXIV0cNncc+Hza0T3hsP6igJnJJsx2aPuOZEYogS2YanxXGNmW5eTbfXlcnl4GNqYdDDwkFAn1LqlaLI4dKgb9J23tG0WcuqjcJJoxolwQlZ3WRbzw3uRizg/xvcXFUprLlcnwA1961jJ1a/cHp2DO+ej5h+ir+mUvF+mwY9kXCzny/61HTN7AbVn05RWKdasy83M1Y+ciKGry3z8hjPLwXKUvwOS9gTg== 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=b7heCSiWS3Z6KECmC2Nkfy1IHKACc9eMgh9EbV31/Mk=; b=MSJqiTZtr0bDM5WceNHAsYE21fF8ICKNv4L3qymjhqZoqrDvNohSFBacjMWyGfbDtX0Pr/+T9cltyjjzNdH0BMZaKs+wkuGhxd3IDs1OcwXAGh+oqhuqEa59b+1bCO16npjry77P/a/+rZ+WmVNhJFqRCrHtjvrDXBfDwG2itUaZsvktlxGv3xanFoskLjhI5TYDbtqrwhwLUd41Bnx0r+U9908ssHcLpiWt8oeSEaBAbUD0ilUXlTWUHYSgANx/6I4HqG4GKz7pG7abwEgiTL9fAMTRm1qzGss8F/ep4gkODsBvoGREh0UJcM+MZUlhIcUYopE98Nkr8N37qjsyZg== 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=b7heCSiWS3Z6KECmC2Nkfy1IHKACc9eMgh9EbV31/Mk=; b=O0gKQg71T2TaIh5X5dKyq250WjPMkzs9quNWqxvXot8Y0B0j2GnskWN56hG7ZNLqfepBJiC631Lk2hCA7l9z5kQ8H1RZ3szyhK4JN2L2OFUFEL3fzNfelvtlTSeVrgFQjKLswdCwjlRg9VDNbpFvBER5e4m3/DFXmPVndzqmcOs= 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 Subject: [PATCH v2 16/20] iotests: 257: prepare for backup over block-copy Date: Mon, 1 Jun 2020 21:11:14 +0300 Message-Id: <20200601181118.579-17-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 09cb2ed6-975d-43be-68b1-08d806573e6f X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:33; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HGKrVVtSADspSlykJ4JY3mMgYnDmK1GfB6q1cSYmgiVwGW27l6KjH8vUrTpBLaReDzo7kGpV9BvoUiw1RN5l8A0BYdC1/k2wolp6/a57qqtEzCjn3tc+qj0dd/UyuLMKtqK1+z2l+k4U/KIaVNSkeBrrQywlbLuwmD4444wZBW28anj55zZNVosvUJAooInPvkJ0Z8U46UwCyS5ghsPS40IWqZjH1vXD+RLeiKealufJPT/LMCuNUcxv58A7WCSF4jEk828SXjWgeG0/mVZd97F8lGGsFtsC96SzK3qFhGCZac0OE5RFlxMlLVsqJV/CTn+ygXSNFIXWdevN1vyLRv98t2A8rK69L984+Q991J1dat2e2SSw30M2ZEzcALdo 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(30864003)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007)(559001)(579004); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: HbK4zLWP6OFe2IJWIk/IVd5ULsmHj5CmSOh5XPnWVZ/smqIi4ENqrBR1grtSLdvCFAbSOmipm7xAYmXY9P2nhpGyTDZnYjfowo0pDuaddXffCgJ3BylHP0AjR6vRAcUZAJeGQuAMYIIH/NwQZOULasPUvgifrBdNSE5S9rhzufB+y9A6jQMyaA2AGXWCiInv4eWXCp1IVgSYeV6iOqYNDgm6MFEPbvMU2nDRfWzuMLpTwImvj8DTWgHT7avfxxa45iSwo7LFIOTPEwjOmxFRQXUJRCI0E0auD0nvr1uwIJWYHnIKhUTpxdHf6kTiPGrt+AzBORumbq83+Zh7SofoDe1sQMZbmm5JlaUVrSS5CzcHPNKOGi69lj+AUGtkJPFKktjKhdBvCRvx1YKIyCaDrnTYoG5s8Llkks9FC1uy189sVmdzaWVQQiT1jpYpforsYILiAyx2308HkA2HnLyEvUU8AsO8MLPeMI+/Lh87SSg= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 09cb2ed6-975d-43be-68b1-08d806573e6f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:45.5302 (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: 7yn3hOQYrz3zrCqWhxlcclTQAefYXkTDLUdSbzwzFMTlL4YAAzm0gVpRsvZh2SL0MYU0iICJ8SfavCJIlA1LpdBoE+UFUoUALT2cJi7geSU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.117; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:40 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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" Iotest 257 dumps a lot of in-progress information of backup job, such as offset and bitmap dirtiness. Further commit will move backup to be one block-copy call, which will introduce async parallel requests instead of plain cluster-by-cluster copying. To keep things deterministic, allow only one worker (only one copy request at a time) for this test. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/257 | 1 + tests/qemu-iotests/257.out | 306 ++++++++++++++++++------------------- 2 files changed, 154 insertions(+), 153 deletions(-) diff --git a/tests/qemu-iotests/257 b/tests/qemu-iotests/257 index 004a433b8b..732b2f0071 100755 --- a/tests/qemu-iotests/257 +++ b/tests/qemu-iotests/257 @@ -191,6 +191,7 @@ def blockdev_backup(vm, device, target, sync, **kwargs): target=3Dtarget, sync=3Dsync, filter_node_name=3D'backup-top', + x_max_workers=3D1, **kwargs) return result =20 diff --git a/tests/qemu-iotests/257.out b/tests/qemu-iotests/257.out index 64dd460055..6997b56567 100644 --- a/tests/qemu-iotests/257.out +++ b/tests/qemu-iotests/257.out @@ -30,7 +30,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -78,7 +78,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -92,7 +92,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-na= me": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "backu= p_target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-na= me": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "backu= p_target_1", "x-max-workers": 1}} {"return": {}} =20 --- Write #2 --- @@ -205,7 +205,7 @@ expecting 15 dirty sectors; have 15. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -219,7 +219,7 @@ expecting 15 dirty sectors; have 15. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-na= me": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backu= p_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-na= me": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backu= p_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -290,7 +290,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -338,7 +338,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -354,7 +354,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-na= me": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "backu= p_target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-na= me": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "backu= p_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"action": "report", "device": "backup_1", "operation": "read"}, = "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds= ": "SECS"}} {"data": {"device": "backup_1", "error": "Input/output error", "len": 3932= 16, "offset": 65536, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COM= PLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} @@ -416,7 +416,7 @@ expecting 14 dirty sectors; have 14. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -430,7 +430,7 @@ expecting 14 dirty sectors; have 14. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-na= me": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backu= p_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-na= me": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backu= p_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -501,7 +501,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -549,7 +549,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -563,7 +563,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-na= me": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "backu= p_target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-na= me": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "backu= p_target_1", "x-max-workers": 1}} {"return": {}} =20 --- Write #2 --- @@ -676,7 +676,7 @@ expecting 15 dirty sectors; have 15. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -690,7 +690,7 @@ expecting 15 dirty sectors; have 15. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-na= me": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backu= p_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-na= me": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "backu= p_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -761,7 +761,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -809,7 +809,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -823,7 +823,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "= backup_target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "= backup_target_1", "x-max-workers": 1}} {"return": {}} =20 --- Write #2 --- @@ -936,7 +936,7 @@ expecting 15 dirty sectors; have 15. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -950,7 +950,7 @@ expecting 15 dirty sectors; have 15. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -1021,7 +1021,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -1069,7 +1069,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -1085,7 +1085,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "= backup_target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "= backup_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"action": "report", "device": "backup_1", "operation": "read"}, = "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds= ": "SECS"}} {"data": {"device": "backup_1", "error": "Input/output error", "len": 3932= 16, "offset": 65536, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COM= PLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} @@ -1147,7 +1147,7 @@ expecting 14 dirty sectors; have 14. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -1161,7 +1161,7 @@ expecting 14 dirty sectors; have 14. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -1232,7 +1232,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -1280,7 +1280,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -1294,7 +1294,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "= backup_target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "= backup_target_1", "x-max-workers": 1}} {"return": {}} =20 --- Write #2 --- @@ -1407,7 +1407,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -1421,7 +1421,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -1492,7 +1492,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -1540,7 +1540,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -1554,7 +1554,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "back= up_target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "back= up_target_1", "x-max-workers": 1}} {"return": {}} =20 --- Write #2 --- @@ -1667,7 +1667,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -1681,7 +1681,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -1752,7 +1752,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -1800,7 +1800,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -1816,7 +1816,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "back= up_target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "back= up_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"action": "report", "device": "backup_1", "operation": "read"}, = "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds= ": "SECS"}} {"data": {"device": "backup_1", "error": "Input/output error", "len": 3932= 16, "offset": 65536, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COM= PLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} @@ -1878,7 +1878,7 @@ expecting 13 dirty sectors; have 13. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -1892,7 +1892,7 @@ expecting 13 dirty sectors; have 13. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -1963,7 +1963,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -2011,7 +2011,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -2025,7 +2025,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "back= up_target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "bitmap", "target": "back= up_target_1", "x-max-workers": 1}} {"return": {}} =20 --- Write #2 --- @@ -2138,7 +2138,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -2152,7 +2152,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -2223,7 +2223,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -2271,7 +2271,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -2285,7 +2285,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "full", "target": "ba= ckup_target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "full", "target": "ba= ckup_target_1", "x-max-workers": 1}} {"return": {}} =20 --- Write #2 --- @@ -2398,7 +2398,7 @@ expecting 15 dirty sectors; have 15. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -2412,7 +2412,7 @@ expecting 15 dirty sectors; have 15. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -2483,7 +2483,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -2531,7 +2531,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -2547,7 +2547,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "full", "target": "ba= ckup_target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "full", "target": "ba= ckup_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"action": "report", "device": "backup_1", "operation": "read"}, = "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds= ": "SECS"}} {"data": {"device": "backup_1", "error": "Input/output error", "len": 6710= 8864, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_= COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} @@ -2609,7 +2609,7 @@ expecting 14 dirty sectors; have 14. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -2623,7 +2623,7 @@ expecting 14 dirty sectors; have 14. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -2694,7 +2694,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -2742,7 +2742,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -2756,7 +2756,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "full", "target": "ba= ckup_target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "full", "target": "ba= ckup_target_1", "x-max-workers": 1}} {"return": {}} =20 --- Write #2 --- @@ -2869,7 +2869,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -2883,7 +2883,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -2954,7 +2954,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -3002,7 +3002,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -3016,7 +3016,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "full", "target": "backup= _target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "full", "target": "backup= _target_1", "x-max-workers": 1}} {"return": {}} =20 --- Write #2 --- @@ -3129,7 +3129,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -3143,7 +3143,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -3214,7 +3214,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -3262,7 +3262,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -3278,7 +3278,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "full", "target": "backup= _target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "full", "target": "backup= _target_1", "x-max-workers": 1}} {"return": {}} {"data": {"action": "report", "device": "backup_1", "operation": "read"}, = "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds= ": "SECS"}} {"data": {"device": "backup_1", "error": "Input/output error", "len": 6710= 8864, "offset": 983040, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_= COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} @@ -3340,7 +3340,7 @@ expecting 1014 dirty sectors; have 1014. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -3354,7 +3354,7 @@ expecting 1014 dirty sectors; have 1014. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -3425,7 +3425,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -3473,7 +3473,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -3487,7 +3487,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "full", "target": "backup= _target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "full", "target": "backup= _target_1", "x-max-workers": 1}} {"return": {}} =20 --- Write #2 --- @@ -3600,7 +3600,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -3614,7 +3614,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -3685,7 +3685,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -3733,7 +3733,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -3747,7 +3747,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "top", "target": "bac= kup_target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "top", "target": "bac= kup_target_1", "x-max-workers": 1}} {"return": {}} =20 --- Write #2 --- @@ -3860,7 +3860,7 @@ expecting 15 dirty sectors; have 15. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -3874,7 +3874,7 @@ expecting 15 dirty sectors; have 15. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -3945,7 +3945,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -3993,7 +3993,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -4009,7 +4009,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "top", "target": "bac= kup_target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "top", "target": "bac= kup_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"action": "report", "device": "backup_1", "operation": "read"}, = "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds= ": "SECS"}} {"data": {"device": "backup_1", "error": "Input/output error", "len": 4587= 52, "offset": 65536, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COM= PLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} @@ -4071,7 +4071,7 @@ expecting 14 dirty sectors; have 14. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -4085,7 +4085,7 @@ expecting 14 dirty sectors; have 14. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -4156,7 +4156,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -4204,7 +4204,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -4218,7 +4218,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "top", "target": "bac= kup_target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_1", "sync": "top", "target": "bac= kup_target_1", "x-max-workers": 1}} {"return": {}} =20 --- Write #2 --- @@ -4331,7 +4331,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -4345,7 +4345,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "on-success", "device": "drive0", "filter-no= de-name": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "= backup_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -4416,7 +4416,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -4464,7 +4464,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -4478,7 +4478,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "top", "target": "backup_= target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "top", "target": "backup_= target_1", "x-max-workers": 1}} {"return": {}} =20 --- Write #2 --- @@ -4591,7 +4591,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -4605,7 +4605,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -4676,7 +4676,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -4724,7 +4724,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -4740,7 +4740,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "top", "target": "backup_= target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "top", "target": "backup_= target_1", "x-max-workers": 1}} {"return": {}} {"data": {"action": "report", "device": "backup_1", "operation": "read"}, = "event": "BLOCK_JOB_ERROR", "timestamp": {"microseconds": "USECS", "seconds= ": "SECS"}} {"data": {"device": "backup_1", "error": "Input/output error", "len": 4587= 52, "offset": 65536, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COM= PLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} @@ -4802,7 +4802,7 @@ expecting 14 dirty sectors; have 14. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -4816,7 +4816,7 @@ expecting 14 dirty sectors; have 14. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -4887,7 +4887,7 @@ write -P0x76 0x3ff0000 0x10000 {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_0", "sync": "full", "target"= : "ref_target_0", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_0", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -4935,7 +4935,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_1", "sync": "full", "target"= : "ref_target_1", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_1", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -4949,7 +4949,7 @@ expecting 6 dirty sectors; have 6. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "top", "target": "backup_= target_1"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_1", "sync": "top", "target": "backup_= target_1", "x-max-workers": 1}} {"return": {}} =20 --- Write #2 --- @@ -5062,7 +5062,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "ref_backup_2", "sync": "full", "target"= : "ref_target_2", "x-max-workers": 1}} {"return": {}} {"data": {"device": "ref_backup_2", "len": 67108864, "offset": 67108864, "= speed": 0, "type": "backup"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": = {"microseconds": "USECS", "seconds": "SECS"}} =20 @@ -5076,7 +5076,7 @@ expecting 12 dirty sectors; have 12. OK! {"execute": "job-dismiss", "arguments": {"id": "bdc-fmt-job"}} {"return": {}} {} -{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2"}} +{"execute": "blockdev-backup", "arguments": {"auto-finalize": false, "bitm= ap": "bitmap0", "bitmap-mode": "always", "device": "drive0", "filter-node-n= ame": "backup-top", "job-id": "backup_2", "sync": "bitmap", "target": "back= up_target_2", "x-max-workers": 1}} {"return": {}} {"execute": "job-finalize", "arguments": {"id": "backup_2"}} {"return": {}} @@ -5139,155 +5139,155 @@ qemu_img compare "TEST_DIR/PID-img" "TEST_DIR/PID= -fbackup2" =3D=3D> Identical, OK! =20 -- Sync mode incremental tests -- =20 -{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "on-success", = "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", = "sync": "incremental", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "on-success", = "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", = "sync": "incremental", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "must provide a valid bitmap n= ame for 'incremental' sync mode"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "always", "dev= ice": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "syn= c": "incremental", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "always", "dev= ice": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "syn= c": "incremental", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "must provide a valid bitmap n= ame for 'incremental' sync mode"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "never", "devi= ce": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync= ": "incremental", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "never", "devi= ce": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync= ": "incremental", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "must provide a valid bitmap n= ame for 'incremental' sync mode"}} =20 -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "api_job", "sync": "incremental", "targe= t": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "api_job", "sync": "incremental", "targe= t": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "must provide a valid bitmap n= ame for 'incremental' sync mode"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top"= , "job-id": "api_job", "sync": "incremental", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top"= , "job-id": "api_job", "sync": "incremental", "target": "backup_target", "x= -max-workers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "j= ob-id": "api_job", "sync": "incremental", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "j= ob-id": "api_job", "sync": "incremental", "target": "backup_target", "x-max= -workers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be 'on-= success' when using sync mode 'incremental'"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "jo= b-id": "api_job", "sync": "incremental", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "jo= b-id": "api_job", "sync": "incremental", "target": "backup_target", "x-max-= workers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be 'on-= success' when using sync mode 'incremental'"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "devic= e": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync"= : "incremental", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "devic= e": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync"= : "incremental", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-= mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job= -id": "api_job", "sync": "incremental", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-= mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job= -id": "api_job", "sync": "incremental", "target": "backup_target", "x-max-w= orkers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be 'on-= success' when using sync mode 'incremental'"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-= mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-= id": "api_job", "sync": "incremental", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-= mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-= id": "api_job", "sync": "incremental", "target": "backup_target", "x-max-wo= rkers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be 'on-= success' when using sync mode 'incremental'"}} =20 -- Sync mode bitmap tests -- =20 -{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "on-success", = "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", = "sync": "bitmap", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "on-success", = "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", = "sync": "bitmap", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "must provide a valid bitmap n= ame for 'bitmap' sync mode"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "always", "dev= ice": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "syn= c": "bitmap", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "always", "dev= ice": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "syn= c": "bitmap", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "must provide a valid bitmap n= ame for 'bitmap' sync mode"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "never", "devi= ce": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync= ": "bitmap", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "never", "devi= ce": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync= ": "bitmap", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "must provide a valid bitmap n= ame for 'bitmap' sync mode"}} =20 -{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "api_job", "sync": "bitmap", "target": "= backup_target"}} +{"execute": "blockdev-backup", "arguments": {"device": "drive0", "filter-n= ode-name": "backup-top", "job-id": "api_job", "sync": "bitmap", "target": "= backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "must provide a valid bitmap n= ame for 'bitmap' sync mode"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top"= , "job-id": "api_job", "sync": "bitmap", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top"= , "job-id": "api_job", "sync": "bitmap", "target": "backup_target", "x-max-= workers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "j= ob-id": "api_job", "sync": "bitmap", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "j= ob-id": "api_job", "sync": "bitmap", "target": "backup_target", "x-max-work= ers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "jo= b-id": "api_job", "sync": "bitmap", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "jo= b-id": "api_job", "sync": "bitmap", "target": "backup_target", "x-max-worke= rs": 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "devic= e": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync"= : "bitmap", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "devic= e": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync"= : "bitmap", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "device"= : "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": = "bitmap", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "device"= : "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": = "bitmap", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be give= n when providing a bitmap"}} =20 -- Sync mode full tests -- =20 -{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "on-success", = "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", = "sync": "full", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "on-success", = "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", = "sync": "full", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mo= de without a bitmap"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "always", "dev= ice": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "syn= c": "full", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "always", "dev= ice": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "syn= c": "full", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mo= de without a bitmap"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "never", "devi= ce": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync= ": "full", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "never", "devi= ce": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync= ": "full", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mo= de without a bitmap"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top"= , "job-id": "api_job", "sync": "full", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top"= , "job-id": "api_job", "sync": "full", "target": "backup_target", "x-max-wo= rkers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "j= ob-id": "api_job", "sync": "full", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "j= ob-id": "api_job", "sync": "full", "target": "backup_target", "x-max-worker= s": 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "jo= b-id": "api_job", "sync": "full", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "jo= b-id": "api_job", "sync": "full", "target": "backup_target", "x-max-workers= ": 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "devic= e": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync"= : "full", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "devic= e": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync"= : "full", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-= mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-= id": "api_job", "sync": "full", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-= mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-= id": "api_job", "sync": "full", "target": "backup_target", "x-max-workers":= 1}} {"error": {"class": "GenericError", "desc": "Bitmap sync mode 'never' has = no meaningful effect when combined with sync mode 'full'"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "device"= : "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": = "full", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "device"= : "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": = "full", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be give= n when providing a bitmap"}} =20 -- Sync mode top tests -- =20 -{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "on-success", = "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", = "sync": "top", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "on-success", = "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", = "sync": "top", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mo= de without a bitmap"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "always", "dev= ice": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "syn= c": "top", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "always", "dev= ice": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "syn= c": "top", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mo= de without a bitmap"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "never", "devi= ce": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync= ": "top", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "never", "devi= ce": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync= ": "top", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mo= de without a bitmap"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top"= , "job-id": "api_job", "sync": "top", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top"= , "job-id": "api_job", "sync": "top", "target": "backup_target", "x-max-wor= kers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "j= ob-id": "api_job", "sync": "top", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "j= ob-id": "api_job", "sync": "top", "target": "backup_target", "x-max-workers= ": 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "jo= b-id": "api_job", "sync": "top", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "jo= b-id": "api_job", "sync": "top", "target": "backup_target", "x-max-workers"= : 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "devic= e": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync"= : "top", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "devic= e": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync"= : "top", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-= mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-= id": "api_job", "sync": "top", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-= mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-= id": "api_job", "sync": "top", "target": "backup_target", "x-max-workers": = 1}} {"error": {"class": "GenericError", "desc": "Bitmap sync mode 'never' has = no meaningful effect when combined with sync mode 'top'"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "device"= : "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": = "top", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "device"= : "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": = "top", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be give= n when providing a bitmap"}} =20 -- Sync mode none tests -- =20 -{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "on-success", = "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", = "sync": "none", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "on-success", = "device": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", = "sync": "none", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mo= de without a bitmap"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "always", "dev= ice": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "syn= c": "none", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "always", "dev= ice": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "syn= c": "none", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mo= de without a bitmap"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "never", "devi= ce": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync= ": "none", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap-mode": "never", "devi= ce": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync= ": "none", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Cannot specify bitmap sync mo= de without a bitmap"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top"= , "job-id": "api_job", "sync": "none", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "on-success", "device": "drive0", "filter-node-name": "backup-top"= , "job-id": "api_job", "sync": "none", "target": "backup_target", "x-max-wo= rkers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "j= ob-id": "api_job", "sync": "none", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "always", "device": "drive0", "filter-node-name": "backup-top", "j= ob-id": "api_job", "sync": "none", "target": "backup_target", "x-max-worker= s": 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "jo= b-id": "api_job", "sync": "none", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "bitma= p-mode": "never", "device": "drive0", "filter-node-name": "backup-top", "jo= b-id": "api_job", "sync": "none", "target": "backup_target", "x-max-workers= ": 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "devic= e": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync"= : "none", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap404", "devic= e": "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync"= : "none", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap 'bitmap404' could not = be found"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-= mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", = "job-id": "api_job", "sync": "none", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-= mode": "on-success", "device": "drive0", "filter-node-name": "backup-top", = "job-id": "api_job", "sync": "none", "target": "backup_target", "x-max-work= ers": 1}} {"error": {"class": "GenericError", "desc": "sync mode 'none' does not pro= duce meaningful bitmap outputs"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-= mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job= -id": "api_job", "sync": "none", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-= mode": "always", "device": "drive0", "filter-node-name": "backup-top", "job= -id": "api_job", "sync": "none", "target": "backup_target", "x-max-workers"= : 1}} {"error": {"class": "GenericError", "desc": "sync mode 'none' does not pro= duce meaningful bitmap outputs"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-= mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-= id": "api_job", "sync": "none", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "bitmap-= mode": "never", "device": "drive0", "filter-node-name": "backup-top", "job-= id": "api_job", "sync": "none", "target": "backup_target", "x-max-workers":= 1}} {"error": {"class": "GenericError", "desc": "sync mode 'none' does not pro= duce meaningful bitmap outputs"}} =20 -{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "device"= : "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": = "none", "target": "backup_target"}} +{"execute": "blockdev-backup", "arguments": {"bitmap": "bitmap0", "device"= : "drive0", "filter-node-name": "backup-top", "job-id": "api_job", "sync": = "none", "target": "backup_target", "x-max-workers": 1}} {"error": {"class": "GenericError", "desc": "Bitmap sync mode must be give= n when providing a bitmap"}} =20 --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591035981; cv=pass; d=zohomail.com; s=zohoarc; b=m/9ovcGP/qbz8P5wZ9EiWpagSuTlImXBIRJxL27Z0/W8ighREuhpL5Sh4J2D05Ml7nMonif9hwkwAKDJqRft9xLvsLMTBSFEsip8wH9uIHuumFHOW19iq9D6oBZmzM6gnBhC2FtRQUCRMTx/zlmmA0/0TtnJlHdQ7zB51rTpebc= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591035981; 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=UjHYtl+u4jr6RDj4bCVeB4oPIsj6rpy14y2kySrZV5I=; b=ZM2xvt/y4uKauEO+B90sAr1V7JIc1A6r3GLA82FVcEvUFVCxLPHpKFMx/RsY3UH5Xt7nCop/pTlb9tgQoowyLOydDJI3DfIKP6XhO1cIZqMh8OK4ruTZfMjR6S2idlAv3zYRe/9eRt9KICUEZdALplXP/C+YIjkfCKpATLAyfr4= 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=none 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 1591035981632924.9961189300407; Mon, 1 Jun 2020 11:26:21 -0700 (PDT) Received: from localhost ([::1]:35370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfp8d-0007eX-PT for importer@patchew.org; Mon, 01 Jun 2020 14:26:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfouf-0005Mj-Nj; Mon, 01 Jun 2020 14:11:53 -0400 Received: from mail-eopbgr70117.outbound.protection.outlook.com ([40.107.7.117]:10211 helo=EUR04-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 1jfoue-00027N-63; Mon, 01 Jun 2020 14:11:53 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:46 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:46 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ecI9ejsGvD2X3Ku+KNKX8UWF48sL5xxOP+ptD0TZtEZdSOfQ51w4+rtkCKlKNYAgZlqt8xPFUQ1VuODYPKNnS2Xr1E8NmUFXnezwt8cU2y1SqGnZqiW2jEt9vr81i7o2jWG8fqd6QbN0ThGUOmqkhvpk48ZVLZLqeb16sfYe7xmizaovbl9XzCgBBS+/3WpBG+6KtGV0mQZHIPIMqh2LVxqDLKscuj2+tJdY1yhNeuT16g7ht2Y1clxhwdxtl09CQ23x2qTsEIElDX4l4T6BeCgT2tgieyydO0M0DdSsIXRaITp5rMZc0XXKQ2i4qXrhBEmP9gAjZ3qlMbXAWNr5Fw== 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=UjHYtl+u4jr6RDj4bCVeB4oPIsj6rpy14y2kySrZV5I=; b=ZPb+VDQHoTgQeub8Gxt3FsrOoQqef7MeIBad3ByMbo7WJk4xv1al2QuqSttKdUWvrPDgRttjZavdrhcovstJ4YFcPoWZ6LGWx5exiH4lWlXIjqBRJFwF6xelFjJUuclQ58pKx7LIdEviwVZK6/EyOlEffAKYdBzrscE5ofA5WACZK2WLQxUpi2TvHArbjt73158CLGCsgS2GBZKzF1dYL6LWZJ7SPI5mk0FCaSyu0U8NBsME6+YWCAoDnfQlRxAXn5O3KNtofChhgFM26zOvThnzelPd+nyBfIqdMniL5g0Y9pdgCL3KMSMWaFt0UiZu4vwZkeXFR0rntnet9EPLxQ== 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=UjHYtl+u4jr6RDj4bCVeB4oPIsj6rpy14y2kySrZV5I=; b=MkY6ncqm1WDNd5HQRB7jVdoqBOWuS2whJ9yvrBY7c4Weue2K1HijRh4agNAMtexBmHYvm+gfI+tKJZN2Xa4Tztaia+FUDgu7OiEnZc5Rvvi+tIukOuz57exf0tcTTF5/aANkqfwAZh7WFkWxCgagYAAUrZYJ2PyObnWkFje1h0A= 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 Subject: [PATCH v2 17/20] backup: move to block-copy Date: Mon, 1 Jun 2020 21:11:15 +0300 Message-Id: <20200601181118.579-18-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a2bafded-fe4b-40c6-0d6b-08d806573f0b X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:112; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2Nj8v6c8vfbjq/jTjVB7oDZhUQeTt+0TTbfJB/jF4iU0tKun4rSt0FEDMnp3XV12Y3zk9OprsrrbuKLaW4GUBlU8FhQHaOabBbIoLGTSUxP8Q0FvjcKHaeysytfKlYlqnrgXrpouEktD5UvfwN6WWBMEHAlYNjgbs6uEER11QwVpQisdyBMdXBEuQzummyvlApbmR9HQcVf9p256KTh9ZwoexpZrZhMOi6EHw1M9F02PVzTvOT7/8WLf+T9sPD3iHmywfwR9SD4glPjpXYj3+83OepepCreX4qd/PXEkJOHR39CFPoOSiUOetc5iiA8CTc4EOtAMTBBh+A/gLYm/8sGyXkSliGZLVRjyTiaAa7Q86Ve+EUMKPA39rtZSprLC 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: /EraILrVjG0yuxcSdSyHuAjWbH0ZiQodnZh8lkN4QpHX/uk2mej7YOhom2nt1u15yQ3I2kaTJxzSOhhcXjrfj+oIArZ32dIfWxaSHfjPxxkLXzUBsnBtpepAZYUeXTwEC2QADgF627GAYc5lnFWksf8/qRoQAsVMyfXW+xO4Q8Vko75VNu5HgrbSep3ikU7oa9RJ2SxtkxuruNu89cHJ/jsgaOZsoBs5GFfIYhnHjtM3FrkSfljFzdDp7cbcB2Pxf8+FCq/yyOB4hLFe/0BXx87URsf7Ur00GszNyjDdV4yyVwL9N5BF+jBwTGVgp5MK380xlNgDMwbcR4P2S4sijjQftI8/aMn338TVhC4ZELQpepp6cBWbUeY9PAzy+1Pe6afwKyjVaOrcrmmKatcF0GQ0D37XecE37q5MKHBCk6xYeiy0m9NsaCpSjTpvJASTqekn8UldjMQ9F97rbZaE10uyK6zvZIVkeZMWpQ+v6rc= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2bafded-fe4b-40c6-0d6b-08d806573f0b X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:46.3809 (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: w55USbS9jDSN9BM3kodvYSmIz6C8qm03XIuiGF8/RG9d7RKsEw3QXS8A76nY/pqB1pNxs7lj/tKTvOkpnwU4DjU9KTGcXNu2zVRE2lcOEK4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.117; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:40 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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" This brings async request handling and block-status driven chunk sizes to backup out of the box, which improves backup performance. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 9 +-- block/backup.c | 145 +++++++++++++++++++------------------ block/block-copy.c | 21 ++---- 3 files changed, 83 insertions(+), 92 deletions(-) diff --git a/include/block/block-copy.h b/include/block/block-copy.h index 370a194d3c..a3e11d3fa2 100644 --- a/include/block/block-copy.h +++ b/include/block/block-copy.h @@ -18,7 +18,6 @@ #include "block/block.h" #include "qemu/co-shared-resource.h" =20 -typedef void (*ProgressBytesCallbackFunc)(int64_t bytes, void *opaque); typedef void (*BlockCopyAsyncCallbackFunc)(int ret, bool error_is_read, void *opaque); typedef struct BlockCopyState BlockCopyState; @@ -29,11 +28,6 @@ BlockCopyState *block_copy_state_new(BdrvChild *source, = BdrvChild *target, BdrvRequestFlags write_flags, Error **errp); =20 -void block_copy_set_progress_callback( - BlockCopyState *s, - ProgressBytesCallbackFunc progress_bytes_callback, - void *progress_opaque); - void block_copy_set_progress_meter(BlockCopyState *s, ProgressMeter *pm); =20 void block_copy_state_free(BlockCopyState *s); @@ -57,7 +51,8 @@ BlockCopyCallState *block_copy_async(BlockCopyState *s, int64_t offset, int64_t bytes, bool ratelimit, int max_workers, int64_t max_chunk, - BlockCopyAsyncCallbackFunc cb); + BlockCopyAsyncCallbackFunc cb, + void *cb_opaque); =20 /* * Set speed limit for block-copy instance. All block-copy operations rela= ted to diff --git a/block/backup.c b/block/backup.c index ec2676abc2..59c00f5293 100644 --- a/block/backup.c +++ b/block/backup.c @@ -44,42 +44,19 @@ typedef struct BackupBlockJob { BlockdevOnError on_source_error; BlockdevOnError on_target_error; uint64_t len; - uint64_t bytes_read; int64_t cluster_size; int max_workers; int64_t max_chunk; =20 BlockCopyState *bcs; + + BlockCopyCallState *bcs_call; + int ret; + bool error_is_read; } BackupBlockJob; =20 static const BlockJobDriver backup_job_driver; =20 -static void backup_progress_bytes_callback(int64_t bytes, void *opaque) -{ - BackupBlockJob *s =3D opaque; - - s->bytes_read +=3D bytes; -} - -static int coroutine_fn backup_do_cow(BackupBlockJob *job, - int64_t offset, uint64_t bytes, - bool *error_is_read) -{ - int ret =3D 0; - int64_t start, end; /* bytes */ - - start =3D QEMU_ALIGN_DOWN(offset, job->cluster_size); - end =3D QEMU_ALIGN_UP(bytes + offset, job->cluster_size); - - trace_backup_do_cow_enter(job, start, offset, bytes); - - ret =3D block_copy(job->bcs, start, end - start, error_is_read); - - trace_backup_do_cow_return(job, offset, bytes, ret); - - return ret; -} - static void backup_cleanup_sync_bitmap(BackupBlockJob *job, int ret) { BdrvDirtyBitmap *bm; @@ -159,54 +136,58 @@ static BlockErrorAction backup_error_action(BackupBlo= ckJob *job, } } =20 -static bool coroutine_fn yield_and_check(BackupBlockJob *job) +static void coroutine_fn backup_block_copy_callback(int ret, bool error_is= _read, + void *opaque) { - uint64_t delay_ns; - - if (job_is_cancelled(&job->common.job)) { - return true; - } - - /* - * We need to yield even for delay_ns =3D 0 so that bdrv_drain_all() c= an - * return. Without a yield, the VM would not reboot. - */ - delay_ns =3D block_job_ratelimit_get_delay(&job->common, job->bytes_re= ad); - job->bytes_read =3D 0; - job_sleep_ns(&job->common.job, delay_ns); - - if (job_is_cancelled(&job->common.job)) { - return true; - } + BackupBlockJob *s =3D opaque; =20 - return false; + s->bcs_call =3D NULL; + s->ret =3D ret; + s->error_is_read =3D error_is_read; + job_enter(&s->common.job); } =20 static int coroutine_fn backup_loop(BackupBlockJob *job) { - bool error_is_read; - int64_t offset; - BdrvDirtyBitmapIter *bdbi; - int ret =3D 0; + while (true) { /* retry loop */ + assert(!job->bcs_call); + job->bcs_call =3D block_copy_async(job->bcs, 0, + QEMU_ALIGN_UP(job->len, + job->cluster_size), + true, job->max_workers, job->max_= chunk, + backup_block_copy_callback, job); =20 - bdbi =3D bdrv_dirty_iter_new(block_copy_dirty_bitmap(job->bcs)); - while ((offset =3D bdrv_dirty_iter_next(bdbi)) !=3D -1) { - do { - if (yield_and_check(job)) { - goto out; + while (job->bcs_call && !job->common.job.cancelled) { + /* wait and handle pauses */ + + job_pause_point(&job->common.job); + + if (job->bcs_call && !job->common.job.cancelled) { + job_yield(&job->common.job); } - ret =3D backup_do_cow(job, offset, job->cluster_size, &error_i= s_read); - if (ret < 0 && backup_error_action(job, error_is_read, -ret) = =3D=3D - BLOCK_ERROR_ACTION_REPORT) - { - goto out; + } + + if (!job->bcs_call && job->ret =3D=3D 0) { + /* Success */ + return 0; + } + + if (job->common.job.cancelled) { + if (job->bcs_call) { + block_copy_cancel(job->bcs_call); } - } while (ret < 0); + return 0; + } + + if (!job->bcs_call && job->ret < 0 && + (backup_error_action(job, job->error_is_read, -job->ret) =3D= =3D + BLOCK_ERROR_ACTION_REPORT)) + { + return job->ret; + } } =20 - out: - bdrv_dirty_iter_free(bdbi); - return ret; + g_assert_not_reached(); } =20 static void backup_init_bcs_bitmap(BackupBlockJob *job) @@ -246,9 +227,14 @@ static int coroutine_fn backup_run(Job *job, Error **e= rrp) int64_t count; =20 for (offset =3D 0; offset < s->len; ) { - if (yield_and_check(s)) { - ret =3D -ECANCELED; - goto out; + if (job_is_cancelled(job)) { + return -ECANCELED; + } + + job_pause_point(job); + + if (job_is_cancelled(job)) { + return -ECANCELED; } =20 ret =3D block_copy_reset_unallocated(s->bcs, offset, &count); @@ -281,6 +267,25 @@ static int coroutine_fn backup_run(Job *job, Error **e= rrp) return ret; } =20 +static void coroutine_fn backup_pause(Job *job) +{ + BackupBlockJob *s =3D container_of(job, BackupBlockJob, common.job); + + if (s->bcs_call) { + block_copy_cancel(s->bcs_call); + } +} + +static void coroutine_fn backup_set_speed(BlockJob *job, int64_t speed) +{ + BackupBlockJob *s =3D container_of(job, BackupBlockJob, common); + + if (s->bcs) { + /* In block_job_create we yet don't have bcs */ + block_copy_set_speed(s->bcs, s->bcs_call, speed); + } +} + static const BlockJobDriver backup_job_driver =3D { .job_driver =3D { .instance_size =3D sizeof(BackupBlockJob), @@ -291,7 +296,9 @@ static const BlockJobDriver backup_job_driver =3D { .commit =3D backup_commit, .abort =3D backup_abort, .clean =3D backup_clean, - } + .pause =3D backup_pause, + }, + .set_speed =3D backup_set_speed, }; =20 static int64_t backup_calculate_cluster_size(BlockDriverState *target, @@ -487,8 +494,8 @@ BlockJob *backup_job_create(const char *job_id, BlockDr= iverState *bs, job->max_workers =3D max_workers; job->max_chunk =3D max_chunk; =20 - block_copy_set_progress_callback(bcs, backup_progress_bytes_callback, = job); block_copy_set_progress_meter(bcs, &job->common.job.progress); + block_copy_set_speed(bcs, NULL, speed); =20 /* Required permissions are already taken by backup-top target */ block_job_add_bdrv(&job->common, "target", target, 0, BLK_PERM_ALL, diff --git a/block/block-copy.c b/block/block-copy.c index b551feb6c2..6a9d891b63 100644 --- a/block/block-copy.c +++ b/block/block-copy.c @@ -39,6 +39,7 @@ typedef struct BlockCopyCallState { int64_t max_chunk; bool ratelimit; BlockCopyAsyncCallbackFunc cb; + void *cb_opaque; =20 /* State */ bool failed; @@ -103,9 +104,6 @@ typedef struct BlockCopyState { bool skip_unallocated; =20 ProgressMeter *progress; - /* progress_bytes_callback: called when some copying progress is done.= */ - ProgressBytesCallbackFunc progress_bytes_callback; - void *progress_opaque; =20 SharedResource *mem; =20 @@ -287,15 +285,6 @@ BlockCopyState *block_copy_state_new(BdrvChild *source= , BdrvChild *target, return s; } =20 -void block_copy_set_progress_callback( - BlockCopyState *s, - ProgressBytesCallbackFunc progress_bytes_callback, - void *progress_opaque) -{ - s->progress_bytes_callback =3D progress_bytes_callback; - s->progress_opaque =3D progress_opaque; -} - void block_copy_set_progress_meter(BlockCopyState *s, ProgressMeter *pm) { s->progress =3D pm; @@ -443,7 +432,6 @@ static coroutine_fn int block_copy_task_entry(AioTask *= task) t->call_state->error_is_read =3D error_is_read; } else { progress_work_done(t->s->progress, t->bytes); - t->s->progress_bytes_callback(t->bytes, t->s->progress_opaque); } co_put_to_shres(t->s->mem, t->bytes); block_copy_task_end(t, ret); @@ -712,8 +700,7 @@ static int coroutine_fn block_copy_common(BlockCopyCall= State *call_state) } while (ret > 0 && !call_state->cancelled); =20 if (call_state->cb) { - call_state->cb(ret, call_state->error_is_read, - call_state->s->progress_opaque); + call_state->cb(ret, call_state->error_is_read, call_state->cb_opaq= ue); } =20 if (call_state->canceller) { @@ -754,7 +741,8 @@ BlockCopyCallState *block_copy_async(BlockCopyState *s, int64_t offset, int64_t bytes, bool ratelimit, int max_workers, int64_t max_chunk, - BlockCopyAsyncCallbackFunc cb) + BlockCopyAsyncCallbackFunc cb, + void *cb_opaque) { BlockCopyCallState *call_state =3D g_new(BlockCopyCallState, 1); Coroutine *co =3D qemu_coroutine_create(block_copy_async_co_entry, @@ -766,6 +754,7 @@ BlockCopyCallState *block_copy_async(BlockCopyState *s, .bytes =3D bytes, .ratelimit =3D ratelimit, .cb =3D cb, + .cb_opaque =3D cb_opaque, .max_workers =3D max_workers ?: BLOCK_COPY_MAX_WORKERS, .max_chunk =3D max_chunk, }; --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591036060; cv=pass; d=zohomail.com; s=zohoarc; b=PwmVYV/RgsNsCWO76nbgUh5/3mM2tXF8vPzT9b4LwXdhmypbB3rfUZt8EIQH6wpngCRuWOjfF4rAYEmn2vxhMWXwf7S+G0+5sf0BEhGJXkLKMD/H5tNijH2AAHYcm14jogUjE19mdyInNCsN1JVb089e1VXftcIp/ZzGiF700ac= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591036060; 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=a6JqXlAS0MeZj7WNu4DCIXcL4WTXJOt0NNgTB+Uo0wI=; b=eY/c/lyxcSEvq1cz03fzgjrLJJCUqA4aaxhAjYq7PNS0UWfncaUA53HacVVXJnyOfHEfHV/0czDEbcINs46E3LRFSvHPQzhLPwLsQnVv1a+OA40ZsmFT5X+RLJkAeIPKusHLBECR8ZgyVxnWdbroArN6LRZfqoFPoh4AoN1r7Os= 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=none 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 1591036060031977.5780584297199; Mon, 1 Jun 2020 11:27:40 -0700 (PDT) Received: from localhost ([::1]:42484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfp9u-00029S-SX for importer@patchew.org; Mon, 01 Jun 2020 14:27:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfoug-0005PV-PS; Mon, 01 Jun 2020 14:11:54 -0400 Received: from mail-eopbgr70093.outbound.protection.outlook.com ([40.107.7.93]:39047 helo=EUR04-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 1jfouf-00026c-NL; Mon, 01 Jun 2020 14:11:54 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:47 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:47 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dtb1/0aC/AhbduEQ72TXAP5hcBE18LHu8SNK8AvEur1mqSSPL0pDpcXxcbdDNgBnVol0G0gKGMAEm6a8pWvQC3ywWC1a6+m4L7zRxyxV0C1hjXGj1QfJh1wBO03FU+LoVoTkJXeqwXGJt9zLFlUZofFODGA1UNC6m2KsSA/QEw0ecgsOIqC0olAG3rLdy4bPEu8tiJOopdcMaYW9NoLTu1TGvSlHWnlS75stlyaFO8t8492fwb6PQKWjS5pyGx+P/4Ebbur3sfmlWevjmC7QMSEMc8wBfwuVfofEcIvNsXClcKaOkCOKL9l+lOBSnhdSH2xeC53wBkofioQsSveS4g== 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=a6JqXlAS0MeZj7WNu4DCIXcL4WTXJOt0NNgTB+Uo0wI=; b=TSLkPJiTNp+Ddgt7Nq/MtZ9AkmLaLFygi6e3fCgqVGOH6mdVg5fnIFHMDxMU0QzAzLqcZFuz1MfAlv+fepqb6ory8VuMiFjfs3FFCy1M+Lbt9jpCDUmjMlciYEzqJRpAxPI8nww2LO8am0w3ijQIfA4+bCKlZEa3d3dTX6rZlT3EEMJWmmv1EPDjJfQaVS1oTj9qmZBGoZQhfR5smgadwfWUWaMqOFe+pLRT/qAMcsbkZu7WQxQLrlU1kssCgUdCrIv2i0xnmiJP9NpEm0bYjNc2nBOZyN0rnr+EOdibKTTgIq7xnwLQQA7tAxYEfET9Mq3l+7Hg64R/8YWBL0CpBw== 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=a6JqXlAS0MeZj7WNu4DCIXcL4WTXJOt0NNgTB+Uo0wI=; b=HHIkwycywIV6cW7xIT0ZOFrLW9CxVZE1BnvDtICykhkQvw66tWHaisNnKuGlLQOrdSz8WNP1GLnvmxkPJLhY3jonnjp4VKv5aVC5W8flt2Squh5MXItvulbbUsOS2JPMC3iFgImm8uzRVQgj3GIb97KnGKpwWl91B9OxqfzdvLU= 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 Subject: [PATCH v2 18/20] block/block-copy: drop unused argument of block_copy() Date: Mon, 1 Jun 2020 21:11:16 +0300 Message-Id: <20200601181118.579-19-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 951d1bb9-bc33-4162-de94-08d806573f8c X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:30; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gliWib2cvJ7DV29UIMk8UrdWiRgobpiobAilA83LIXMJL8po34O701L1ETglgC7PxlMZTtgj6CvE8KjhxP0ROJKH76PTqSF0ze9y5TqZJLuXHMWMsOqnvOPv15zB+yehVzOtnlwob/te5OGWDQsW8ItbTQjSwGXG8oOkt+rSS2e8Jx2pESP54i2GOSA39Ao11t8RKl2pONsUmEvWTAPs5O7Ml55DFXi/ga0BAMqsErBWVVakXHKhZz8Mhnb1AqvbEU7ybVfFU1MCgQbUtm0SUr+EpIi/FvVkcTXCoqkbo/0bRPsvgoKgUmkBui3DNGJ2eLPl+cInDmjfiSwrwJXQOQ/nVopMNNner+n8+S3AOgtEqKTPTOrjQzjbNUFNyGBc 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: T39CMsRE2qYQjtmuYbo1M8K2lwka0B1DDo55EUUEHRMxbBo3lBauvsdZhtlPkIRLtymOocw+uaDVJXZrZo1MQjht7iriCKV6qurrAYNCoCEPuX4s1CmwQ5CQdRgTeyHDOtvKeYop7EPvhEvXYfkWLY+4fZkXl6jo+xuM9wog/YPcoIoGRYG8SXDyFOUNuk9zIFrkWJoPma7b6VwrMPu2CpT40hDXxBZHEEKi1Bzm/8ujGZC8LVLW2wK/lfrpfe1MvuAosRUWBt34YLNTWc/Eb1uCQVF6IRTEjm6wi5dHSHxeXqFQxvxxtijEdwNgzsoK3euwslrhVBR5lxZMMGgUrUadlKSUcxtYtfvffQrjxJ6Ck76OlEehBOHvb6w5BbS66Qg5B5UVuUK7kSc4rk/hGXil68rIrFTh//Mop5+IiwSTqOMl9WH/n7Xkkv9j+2hgCDtzIjjyP4Ipl4pMTi26e8k1NhCuPLkojQ5IAP+mhn8= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 951d1bb9-bc33-4162-de94-08d806573f8c X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:47.2362 (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: q6jk4GbE3BV1CnjG16jRkAoP74IFCfC7p/Lah3W7EgOso2eK+GarG3jKfOSaZ4dsxEkrMb15FOV61lAfnERDl1S3qBJgtNVm3H1uq5NtWO4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.93; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:32 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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: Max Reitz --- include/block/block-copy.h | 3 +-- block/backup-top.c | 2 +- block/block-copy.c | 11 ++--------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/include/block/block-copy.h b/include/block/block-copy.h index a3e11d3fa2..760dfc9eae 100644 --- a/include/block/block-copy.h +++ b/include/block/block-copy.h @@ -35,8 +35,7 @@ void block_copy_state_free(BlockCopyState *s); int64_t block_copy_reset_unallocated(BlockCopyState *s, int64_t offset, int64_t *count); =20 -int coroutine_fn block_copy(BlockCopyState *s, int64_t offset, int64_t byt= es, - bool *error_is_read); +int coroutine_fn block_copy(BlockCopyState *s, int64_t offset, int64_t byt= es); =20 /* * Run block-copy in a coroutine, return state pointer. If finished early diff --git a/block/backup-top.c b/block/backup-top.c index 0a09544c76..f4230aded4 100644 --- a/block/backup-top.c +++ b/block/backup-top.c @@ -61,7 +61,7 @@ static coroutine_fn int backup_top_cbw(BlockDriverState *= bs, uint64_t offset, off =3D QEMU_ALIGN_DOWN(offset, s->cluster_size); end =3D QEMU_ALIGN_UP(offset + bytes, s->cluster_size); =20 - return block_copy(s->bcs, off, end - off, NULL); + return block_copy(s->bcs, off, end - off); } =20 static int coroutine_fn backup_top_co_pdiscard(BlockDriverState *bs, diff --git a/block/block-copy.c b/block/block-copy.c index 6a9d891b63..6cb721cc26 100644 --- a/block/block-copy.c +++ b/block/block-copy.c @@ -713,8 +713,7 @@ static int coroutine_fn block_copy_common(BlockCopyCall= State *call_state) return ret; } =20 -int coroutine_fn block_copy(BlockCopyState *s, int64_t start, int64_t byte= s, - bool *error_is_read) +int coroutine_fn block_copy(BlockCopyState *s, int64_t start, int64_t byte= s) { BlockCopyCallState call_state =3D { .s =3D s, @@ -723,13 +722,7 @@ int coroutine_fn block_copy(BlockCopyState *s, int64_t= start, int64_t bytes, .max_workers =3D BLOCK_COPY_MAX_WORKERS, }; =20 - int ret =3D block_copy_common(&call_state); - - if (error_is_read && ret < 0) { - *error_is_read =3D call_state.error_is_read; - } - - return ret; + return block_copy_common(&call_state); } =20 static void coroutine_fn block_copy_async_co_entry(void *opaque) --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591035805; cv=pass; d=zohomail.com; s=zohoarc; b=GWKwWpJdBXvnltSygxTMbpuA2SvpN9sgFf1Zz11NjtMQYvpQ2vQdDvkBWg4lxBsxAFhb6Lwp2yIscp5TYgNymAnYQvtkPE4qwl9jx4WMZmwelQBmZ8W395n484UUnzytKN+BSDeK+NJERnZr4uBOIDFW02oOLzjZgWhjW/Ce6tU= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591035805; 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=cRYGwYFnRiNvUOKySjXGOxsgPnCdKbAgtWwjjH0icW4=; b=JTWDvEGlpB5o9Hgs+AZQpuNMoonBUYgO6QlibHHt8B7iH3Q+OX72+zZWMLly4o3zw/mzNLOHLIEqZsi4qmXlF47x7b/CGROyn5d6oRhotP5iJvDBZBDJSP2uBvTQPJV7WzjjCWadyuuNpNGHCAFKcPxl4C0R1Dy6tBmZ+3L73+g= 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=none 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 159103580561713.884042910790527; Mon, 1 Jun 2020 11:23:25 -0700 (PDT) Received: from localhost ([::1]:52100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfp5o-0002iz-Am for importer@patchew.org; Mon, 01 Jun 2020 14:23:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfouh-0005Qn-8h; Mon, 01 Jun 2020 14:11:55 -0400 Received: from mail-eopbgr70117.outbound.protection.outlook.com ([40.107.7.117]:10211 helo=EUR04-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 1jfoug-00027N-8D; Mon, 01 Jun 2020 14:11:54 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:48 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:48 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R53cB136DB3Eg+/dxd9tX+LvQ6bbCTXobvg0Q5wN9YW94fzTmz9WqCg5VbGoik5XDnyorNuqRWC5VFd8wSPt4ILVJ0GvxrxCLjSnDdC+P0teZqxzanKLS+TnHLca2p0DfbY4qZ1cUxB9lvgldai3DWmNr/nlRImL4uhjBSXuHUc6peyJQKJP12RNmVuMf0LeEyDtqpVqX84JSwbzpyiSC2r4OSvSDZ0xW9IGnk3WzNG26GiGJg83gAMbLg0YlxuwBlhuYdtKwtuw1OPbKsrGXjFgkFWHlRLFcWtWm9cdqRVp+EzqHQtbr3ow7TVfqL4Z1jTwuoPjTaf+vOtjhH+iJg== 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=cRYGwYFnRiNvUOKySjXGOxsgPnCdKbAgtWwjjH0icW4=; b=T6ojhMi6vKuwR3LBBgjjGfoFB6dxkJo+a6Y8Cy2iWLRnvQ4NVNGtLJTCXHqSytwNy+lbfYsiBR6w/aI2iZSFwXUF6i51MTCN6XaGnN2mhL/UANCWIH9LJAskNDYdevkuZcej+kvh+2R8PuvK0W4MfEBhC+XYigOI6aR98adoYfmqg9Orjc+YIsTw5hKvb6bnS/RHa/MUUS/JGIroMgoPUPoKCk+4W71fry3Drv6/iBru/7+EmqpIgLsG+6dElQ/egM4uZRQrdNtfbQj8rpx+RSmOgscTWffXzHW/tvPvquzQvMlVLG5Pw7phhGxLJVDuTsSA0wFO3Xz/RMcM/DVdew== 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=cRYGwYFnRiNvUOKySjXGOxsgPnCdKbAgtWwjjH0icW4=; b=F5IzlBusOH4M2WKvHzCTkc0Y1mclw3PZLkRbov6aQx2r9BczhIOD356QJpRjTKIvvv3BTV4nItbXS9IsvbXn2+CtnajRclhMfVf1pvN7DX9yKrReioY4uOUHmiQxGreucqqgFDtQVbB6Iq/DGiqAyKlapIABtxPZPF8B/6NrTfk= 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 Subject: [PATCH v2 19/20] simplebench: bench_block_job: add cmd_options argument Date: Mon, 1 Jun 2020 21:11:17 +0300 Message-Id: <20200601181118.579-20-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e7597b3b-2e1b-49ff-fa49-08d80657400f X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1751; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yK4ZQGfVRhUTdLZOW2tyye4dmcl3uKXeq51E1PS7XjuvWlcJeiZRTBuz16gGef1GYbFmPhUTYweBWqqZmHdLBnZkcjWTeQf40eCYL2Zv95AYNzbWGuGJuIPU7GoeZJtmPn2nnV67eP5P8Awoouh4kgYAho8wqpW24rFny9cr3SZbYOiIUP9iyFQ+zmMTfR38saOzaZOr/U5exl6UTX7V3XkKCTdSBccUFYd1MlFERAKCIqrp56N60WELQlw4mv9pH/E5qH3keTsbZgTkq9+zVa8Q5J7M1OAUnlZAXAxG9AQI+hPG5WLwMrqA1J3WzOR1hQjNNeirAAfFB4N8zvrMJxWc6vz5btC8R5mH4PEguWEY+2mq1T+08UM/2d+t0z8p 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: FlR9tnOaFcncFPkTkGjyZHu8JKXbT2pDTdHs/hIpsHR/2pX1rsD6qH9+cb11JytCHwJjqmbUAKd17PKzF0KGHkOruLQXy0JpGIHcvGT4CUkIum/TfsUZOhaAqiD5vDIszn9psReVLxprGnqK4n617ymOVVIPHMlVr1XAtWgSQiMl9ss5h5qjgmX21T4X8YWhJWlNuJ2rDiMr16siHy+6z09buJXs+WxoGpCP5tMkFjUSjmIuOe2P3H47ntlQg16kpzGEs4FywEsAqTgPQRUzdJ6kguUQsIZskLx9CueupbASIz4ifvzqpBJzR+1LkXV0gv/mh+kgpZmg3wrZO9JNiSTBVOA9LWm6esSP6WznLfBKs0mzSo/nHBeLpVP9rFmY63KW4mQsAIPqTST2UgHghE85OhAGSawivhATbR6wEtiTbX4D14dYn7c/zUx5lkRC10GwxymYjbrtxtk2wlAffY8jBaMfbAWUtFasCdwng1M= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e7597b3b-2e1b-49ff-fa49-08d80657400f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:48.1104 (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: uFP/aXrtLP16xBdjrCxgLf3fbmTso1gNClhWeBk3iFsthSrJ21YY/x8wDQgKZRNciuAG1qs5g6RjsfNTiQto2tJPusy7IJ0LrmGYaBri2CI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.117; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:40 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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 argument to allow additional block-job options. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- scripts/simplebench/bench-example.py | 2 +- scripts/simplebench/bench_block_job.py | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/simplebench/bench-example.py b/scripts/simplebench/ben= ch-example.py index c642a5b891..c3d17213e3 100644 --- a/scripts/simplebench/bench-example.py +++ b/scripts/simplebench/bench-example.py @@ -24,7 +24,7 @@ from bench_block_job import bench_block_copy, drv_file, d= rv_nbd =20 def bench_func(env, case): """ Handle one "cell" of benchmarking table. """ - return bench_block_copy(env['qemu_binary'], env['cmd'], + return bench_block_copy(env['qemu_binary'], env['cmd'], {} case['source'], case['target']) =20 =20 diff --git a/scripts/simplebench/bench_block_job.py b/scripts/simplebench/b= ench_block_job.py index 9808d696cf..7332845c1c 100755 --- a/scripts/simplebench/bench_block_job.py +++ b/scripts/simplebench/bench_block_job.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Benchmark block jobs # @@ -78,16 +78,19 @@ def bench_block_job(cmd, cmd_args, qemu_args): =20 =20 # Bench backup or mirror -def bench_block_copy(qemu_binary, cmd, source, target): +def bench_block_copy(qemu_binary, cmd, cmd_options, source, target): """Helper to run bench_block_job() for mirror or backup""" assert cmd in ('blockdev-backup', 'blockdev-mirror') =20 source['node-name'] =3D 'source' target['node-name'] =3D 'target' =20 - return bench_block_job(cmd, - {'job-id': 'job0', 'device': 'source', - 'target': 'target', 'sync': 'full'}, + cmd_options['job-id'] =3D 'job0' + cmd_options['device'] =3D 'source' + cmd_options['target'] =3D 'target' + cmd_options['sync'] =3D 'full' + + return bench_block_job(cmd, cmd_options, [qemu_binary, '-blockdev', json.dumps(source), '-blockdev', json.dumps(target)]) --=20 2.21.0 From nobody Tue May 21 03:46:17 2024 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=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1591035976; cv=pass; d=zohomail.com; s=zohoarc; b=eSW3gitW9YxLP5YKpSab8bz77MfQfbssVG3D4/KFXNNxWNzA16gF+TZzjs7NHX1F0Yoixv39dy6slmBYrEjemOO9m1cX+h31H65BUoe7VaPydm9vdeSHvFfwGJosweIIo+WWYUIrfBCGr8SfBX5cuQDkHmz/froJWZWbfRON9Os= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591035976; 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=JuoEurP90kYN5NvdWyFGpyZ0Z+G5YuQ4ObNKY8rXjBY=; b=OsQxuhiYNG8ymNHOilmOJgCVKWCg5tGQDYIcKespjORoFk1BIy59FcoU3BrF+kycrDrMf6SzfQ9dnUVNQUVpTfSXaipYTCrrhMMmOmzgKQ5GdSjmW+EUZtZ/1TfBnIhdNX94gkW9Ek1T/9VbHY00R3tNt9tEF0DRyIta33IOvwk= 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=none 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 1591035976776672.0452249652154; Mon, 1 Jun 2020 11:26:16 -0700 (PDT) Received: from localhost ([::1]:35166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfp8Y-0007ZU-FL for importer@patchew.org; Mon, 01 Jun 2020 14:26:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfov2-00068A-JS; Mon, 01 Jun 2020 14:12:16 -0400 Received: from mail-eopbgr70093.outbound.protection.outlook.com ([40.107.7.93]:39047 helo=EUR04-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 1jfov1-00026c-CZ; Mon, 01 Jun 2020 14:12:16 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM7PR08MB5317.eurprd08.prod.outlook.com (2603:10a6:20b:101::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Mon, 1 Jun 2020 18:11:49 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::a408:2f0f:bc6c:d312%4]) with mapi id 15.20.3045.024; Mon, 1 Jun 2020 18:11:49 +0000 Received: from localhost.localdomain (185.215.60.170) by AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18 via Frontend Transport; Mon, 1 Jun 2020 18:11:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XNAY83t2OTCyCQOymN3eGJoNm7Cz9RytKHxSpTqC4vhjS65EPU4+Y6Y1wllG0RI4hDogVKstDddiL6V/FUb2/S8AwROsixoV2rQnn1YARcN+ZmmECeQhBDuM1bxwB1qRcyRS5eFVTAQJZnuq0vO6kp7DstM9bAyfdqM6qfFwCHFZYeJ81pVYgvG6jlPC3C9seTwJtId4lsYwPGhrXqPYZZ5qD6Ilhi9vA/de4VomITXec81bjWz/1GToq5uv+Wdxlf3HtrOou8VDObT5G1/7aFoD+FNBfOtXhCwrj4xycHaktgdHNP8bNc+Mz8mOm7j4LxYSXnMoqPC+MTgGz+xilw== 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=JuoEurP90kYN5NvdWyFGpyZ0Z+G5YuQ4ObNKY8rXjBY=; b=nzSJ1bA5BCS+7KWdeaZ6pRzAS2vvgPyL0ILYdWrDbwRKHxpG2EiI4/s1QZWICNYJK3thOox4T50c4yuFi+J+pfoQX9ofSkYdcciEcPE57RoehF7JzvHK8c37KYMqaFGdFTpYp9CqNqWT8PfeuRQCNFBguZaG03FoavhDdSZJVfR7Z2pBolithQNsNFhzHOwvpAni6u+ZdUqHnO70NS1q8E9E9G+nIV9hXcU4UGx0zD5vd8qH2GR6IBAO3NKCVuZ/oMzhrE1eZS3QT4aLPaLdRS5hzr7FvhHoQRlle8H2qNAxpgtiv4woAQIJuKSVl9+lzn45sNqJbXkEQcXveiWNRw== 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=JuoEurP90kYN5NvdWyFGpyZ0Z+G5YuQ4ObNKY8rXjBY=; b=T6v30bRvmX0oETG/uon095dsCtlDdJLxQ1lysYldmw2s+ax0GteRcf8NtSi+F3WcF2YaSyBUyqgbf9GgfJSJwGP7KzA/4Mdo7oB0n/RSp2kREjjTkrhJp5pxPk6Shj9O23ZpSlhZqB93tTyHPSfo8+/Ffq4JW3cuewkhreS8RQk= 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 Subject: [PATCH v2 20/20] simplebench: add bench-backup.py Date: Mon, 1 Jun 2020 21:11:18 +0300 Message-Id: <20200601181118.579-21-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200601181118.579-1-vsementsov@virtuozzo.com> References: <20200601181118.579-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::38) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.170] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 41057229-1195-4c55-0fa3-08d806574095 X-MS-TrafficTypeDiagnostic: AM7PR08MB5317: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /pz5LwcDfwij/C3nZb0eusAdGwAW3WgLkKidsnWmmgtiFQcvm/X9ZAGTBa1uGxRT8wFdQxMTapR16tb8yOO9EzDXE9p5MFlv4wIgKX4YPLZgTmkJkmXkOuD194bYEUYoA+QhDYlFUiGYiwihiEWbMllSgJWQwhvrctTLCd5RGODl/gZ4CwceazDmYtC53i99nQYbVkVMbiJE7I69NV1b/rgP25ZHYEjpEJDgf2Y1orC3sIFesRYvdzlmdVCK2Qd9j+oePs/wx+zFkaxjyA4HVzAHboQ3ElzVuVoUx7hfnmEXmgg5vmigIeQxCULXWU9U42yLUMVYmKno7gL7/piR/bbc4Wc3zBMEdNACMZVueT2F2P8ZMFzb0x/r0qHvrettHzN7LWE8V7uOgGsxVNNGYkbM+LktuVbeZJWxOCG4z+EyrewthNwwrz2LBd/whMMeMlcbq3WoMaJDggQSxE7Ol41NMad3I77GqSyIFMEYix8= 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; SFTY:; SFS:(4636009)(136003)(396003)(376002)(39840400004)(346002)(366004)(186003)(16526019)(8936002)(2906002)(8676002)(26005)(107886003)(36756003)(316002)(6916009)(52116002)(2616005)(956004)(478600001)(4326008)(86362001)(6486002)(66946007)(66476007)(66556008)(6512007)(6666004)(1076003)(69590400007)(5660300002)(83380400001)(6506007)(2004002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: A/9HkfnLnLVEzTHfj1PVPgaA0aO4OLSBoO7j2udIvK+Hhj2SS0Gv1ClO8T/FWp0AE+JcXUWvB0xKVAzpoTQYxXAzhEB3hSczCOXJzLIacgiw5ZPQAxv6EcpSjgeUUqyna38X5heuV6TWYTFSAo0v6ZoDoqF1cc4vYwofofdP8QzL9BKrQVcqECGL+5i5eViFV7BwaI5Rpq4TTmp4IPz4m9d22bf85x3kWYkXnKj+1eFNZd+1ak7tWPZnTW5HsLgzSiEmpA5uU15huV1FbkPsngOq5ya8yDY7Ae+lBc44vT4C/SPac0Uli6beAE6qIMdc7XdcmAAhKmFLl21rjA+ImiVGk2csOtk/91dS1kQvYsf1RJ04/ndXcViGYxGnw+oMW8QzuEYWl26PtKR2bRy4CIwBhR2CzCFzjKtLJ9WfTamtzP1Zou5GfLcLX2KCPTlyzPLOK0dg3u8yr/WvinlcTfPvtjNfrK/bVv2PeLWKHtU= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 41057229-1195-4c55-0fa3-08d806574095 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 18:11:48.9631 (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: 9G5ONW4AqIQYCvog2Y2wfqNnN4eA4FzdpFxB5GeG+ly5snpf1dj+r72L4ExntPz8DD3WUjf24YxI6IdrH+nylEKl0XIZUv+3kY7MU+pdoIE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5317 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.7.93; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 14:11:32 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: , Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, wencongyang2@huawei.com, xiechanglong.d@gmail.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com 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 script to benchmark new backup architecture. Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/simplebench/bench-backup.py | 132 ++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100755 scripts/simplebench/bench-backup.py diff --git a/scripts/simplebench/bench-backup.py b/scripts/simplebench/benc= h-backup.py new file mode 100755 index 0000000000..8930d23887 --- /dev/null +++ b/scripts/simplebench/bench-backup.py @@ -0,0 +1,132 @@ +#!/usr/bin/env python3 +# +# Bench backup block-job +# +# Copyright (c) 2020 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 argparse +import simplebench +from bench_block_job import bench_block_copy, drv_file, drv_nbd + + +def bench_func(env, case): + """ Handle one "cell" of benchmarking table. """ + cmd_options =3D env['cmd-options'] if 'cmd-options' in env else {} + return bench_block_copy(env['qemu-binary'], env['cmd'], + cmd_options, + case['source'], case['target']) + + +def bench(args): + test_cases =3D [] + + sources =3D {} + targets =3D {} + for d in args.dir: + label, path =3D d.split(':') + sources[label] =3D drv_file(path + '/test-source') + targets[label] =3D drv_file(path + '/test-target') + + if args.nbd: + nbd =3D args.nbd.split(':') + host =3D nbd[0] + port =3D '10809' if len(nbd) =3D=3D 1 else nbd[1] + drv =3D drv_nbd(host, port) + sources['nbd'] =3D drv + targets['nbd'] =3D drv + + for t in args.test: + src, dst =3D t.split(':') + + test_cases.append({ + 'id': t, + 'source': sources[src], + 'target': targets[dst] + }) + + binaries =3D [] + upstream =3D None + for i, q in enumerate(args.qemu): + name_path =3D q.split(':') + if len(name_path) =3D=3D 1: + binaries.append((f'q{i}', name_path[0])) + else: + binaries.append((name_path[0], name_path[1])) + if name_path[0] =3D=3D 'upstream' or name_path[0] =3D=3D 'mast= er': + upstream =3D binaries[-1] + + test_envs =3D [] + if upstream: + label, path =3D upstream + test_envs.append({ + 'id': f'mirror({label})', + 'cmd': 'blockdev-mirror', + 'qemu-binary': path + }) + + for label, path in binaries: + test_envs.append({ + 'id': f'backup({label})', + 'cmd': 'blockdev-backup', + 'qemu-binary': path + }) + test_envs.append({ + 'id': f'backup({label}, no-copy-range)', + 'cmd': 'blockdev-backup', + 'cmd-options': {'x-use-copy-range': False}, + 'qemu-binary': path + }) + if label =3D=3D 'new': + test_envs.append({ + 'id': f'backup({label}, copy-range-1w)', + 'cmd': 'blockdev-backup', + 'cmd-options': {'x-use-copy-range': True, + 'x-max-workers': 1}, + 'qemu-binary': path + }) + + result =3D simplebench.bench(bench_func, test_envs, test_cases, count= =3D3) + print(simplebench.ascii(result)) + + +class ExtendAction(argparse.Action): + def __call__(self, parser, namespace, values, option_string=3DNone): + items =3D getattr(namespace, self.dest) or [] + items.extend(values) + setattr(namespace, self.dest, items) + + +if __name__ =3D=3D '__main__': + p =3D argparse.ArgumentParser('Backup benchmark') + p.add_argument('--qemu', nargs=3D'+', help=3D'Qemu binaries to compare= , just ' + 'file path with label, like label:/path/to/qemu. Qemu ' + 'labeled "new" should support x-max-workers argument fo= r ' + 'backup job, labeled "upstream" will be used also to ru= n ' + 'mirror benchmark for comparison.', + action=3DExtendAction) + p.add_argument('--dir', nargs=3D'+', help=3D'Directories, each contain= ing ' + '"test-source" and/or "test-target" files, raw images t= o ' + 'used in benchmarking. File path with label, like ' + 'label:/path/to/directory', action=3DExtendAction) + p.add_argument('--nbd', help=3D'host:port for remote NBD ' + 'image, (or just host, for default port 10809). Use it = in ' + 'tests, label is "nbd" (but you cannot create test ' + 'nbd:nbd).') + p.add_argument('--test', nargs=3D'+', help=3D'Tests, in form ' + 'source-dir-label:target-dir-label', action=3DExtendAct= ion) + + bench(p.parse_args()) --=20 2.21.0