From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from OSPPR02CU001.outbound.protection.outlook.com (mail-norwayeastazon11023113.outbound.protection.outlook.com [40.107.159.113]) by lore.virtuozzo.com (Postfix) with ESMTPS id 68C108017D for ; Wed, 30 Sep 2026 11:21:38 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=u0VdITElT4kDlHyh4Xuj9SQcALk1If3U5nXdNKjaQ2U711lVNAMozPkpiLMOY5jGeo1CAU6y2FMgeAB4FYkby+u9EOhcH/VI4uYCDtD076EIQxaFpnEhaIVqzBuoUyHajbOLMosdM6iYPD1vn3vE/k3DJm2ubSb9XL1rndWsnogjFApmo2RpzT1wSylMLjhg7E7CCX55QIPyA+a2/R+P5on20wCFWsYUxBTTcPhnApLPZD0xBlo/xDlkcfFZovorLLnl9RJi9stSNl9vQ3n6n3jugi3hqDJxMw5qD2F5vWdz+pVcsxaO66D2OfMkMj0NWzjBpehycbXg51debLSNFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HzCrICmaTnkKaPIN125xr/RNz7Cpd87W7ZmaXHmEe3E=; b=a0ppluGhhDHY5jebpmg0HS4G6FjtaTsFhb4R2gS4qd6fZXmGR7dE3RPdmQUlVF2SeJu/w31hsCQcOaxyEMIliLLgD8T6a+Qawi7jf7Sb87DWEHMZUk27yRIn+p6qoIjJhtj1EyVLN473elXq+ZKymS0GhX0sJzcQyrNP5NUL6L+PjuqSsBijQA9K4Q3isZCevio8dkV/98ixQYt04Ovyq2LAa1ez5NJLNgR2G3v0s3Wi/tTzXxY6POKzGIS29bX5pVy9iQyCAGxdoq0aSruVpdDh2XLYeWDip/Ii2pN5bQhsrSTcCmhkH81KPwF+rvUk1n8taUl/tFSflnZUz15fwQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 69.169.224.2) smtp.rcpttodomain=virtuozzo.com smtp.mailfrom=eu-central-1.amazonses.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=sashiko.virtuozzo.com; dkim=pass (signature was verified) header.d=sashiko.virtuozzo.com; dkim=pass (signature was verified) header.d=amazonses.com; arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.onmicrosoft.com; s=selector2-virtuozzo-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HzCrICmaTnkKaPIN125xr/RNz7Cpd87W7ZmaXHmEe3E=; b=gJGa5falM8aSdSGCx8LhuxiyZNS43d3Xh+1Z8Kudf0LR4bLc1SJK6B52aZ3U6XQoDrDWsuXgDWFAhY4Y3jBbhTCHCVPaulcwxE9KCtRxkCv1u20GOSyc0m9U0mYBhsO8EOHzpmo7mLmqqF3JsigXa/RgqqxmConJRSoPLq85oSA= Received: from MM0P280CA0071.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:8::25) by GV1PR08MB11145.eurprd08.prod.outlook.com (2603:10a6:150:1ef::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.451.18; Wed, 30 Sep 2026 11:21:30 +0000 Received: from CPH1EPF0000051E.eurprd04.prod.outlook.com (2603:10a6:190:8:cafe::9b) by MM0P280CA0071.outlook.office365.com (2603:10a6:190:8::25) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.472.15 via Frontend Transport; Wed, 30 Sep 2026 11:21:30 +0000 Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 69.169.224.2) smtp.mailfrom=eu-central-1.amazonses.com; dkim=pass (signature was verified) header.d=sashiko.virtuozzo.com;dkim=pass (signature was verified) header.d=amazonses.com;dmarc=pass action=none header.from=sashiko.virtuozzo.com; Received-SPF: Pass (protection.outlook.com: domain of eu-central-1.amazonses.com designates 69.169.224.2 as permitted sender) receiver=protection.outlook.com; client-ip=69.169.224.2; helo=b224-2.smtp-out.eu-central-1.amazonses.com; pr=C Received: from b224-2.smtp-out.eu-central-1.amazonses.com (69.169.224.2) by CPH1EPF0000051E.mail.protection.outlook.com (10.167.241.233) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.472.14 via Frontend Transport; Wed, 30 Sep 2026 11:21:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=23yjbh4k34hwzfubhuiim7m4inbd3ick; d=sashiko.virtuozzo.com; t=1790767289; h=From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date:Message-ID; bh=fKEnzEYHevLeIrdK7irjfKqe94waxKkVZwPMT60/3a4=; b=Is72CpO90sVReW0Hv4Vc8krLsgs7Ih5StQdFlyCzBJTzj8vIqAvN7OwQzrOT5euS +YW0aiHx9xpcHzw4/B0m56+BMgwXnTCHlcuYZCtjK9vuOKfE2vl5IVczegwAPeGDchs 91Xj49FYvzkJSpdDIp1Rg18Q/ZWbaM5+JesTTfKDEcF+b3NCP96lBwvrEY08sO0e4Yq VaD8RPaYgwiCz5yOJntYX+nvOWy+w1aQYgifRrKO3u44A+/MQADbemQvAhMxDPX4RPe 1oUGuAKYN6jKFEPAmFeU/+dOZePTsmAK03AoN7XdqxuUD4TZSidayRWMIQNp+FE/gfg lxKJEqEfNg== DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=sokbgaaqhfgd6qjht2wmdajpuuanpimv; d=amazonses.com; t=1790767289; h=From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date:Message-ID:Feedback-ID; bh=fKEnzEYHevLeIrdK7irjfKqe94waxKkVZwPMT60/3a4=; b=T4t1BALM9261vGFsQf+x4DsQd4nlBDfd+Pg3Y7so4MHbfEnwqkfrwYkwQiKw8kHH f7SG/ZjDA2P9cIJZ2fDUgeofdNaveJWFhPiLlS1hmvsJDWV4BWAzDP/9aZEzZehqHrl /q2O2PWFO3YjqTmSwnlTwCrkwTd1V7znuLJm63JI= From: no-reply@sashiko.virtuozzo.com Subject: Re: [PATCH hci-8.0 3/9] block/commit: batch block-status queries #VSTOR-134085 To: svt-core@virtuozzo.com, "Denis V. Lunev" Cc: andrey.drobyshev@virtuozzo.com, den@virtuozzo.com In-Reply-To: <20260930111739.3866427-4-den@openvz.org> References: <20260930111739.3866427-1-den@openvz.org> <20260930111739.3866427-4-den@openvz.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 30 Sep 2026 11:21:29 +0000 Message-ID: <010701a0f20c5570-39b1d699-6f17-4657-bcbf-e88a53573039-000000@eu-central-1.amazonses.com> Feedback-ID: ::1.eu-central-1.2wRQJBpg9g1fGRYexx3dUuYGS25Bux+2TEOx72/m6U4=:AmazonSES X-SES-Outgoing: 2026.09.30-69.169.224.2 X-EOPAttributedMessage: 0 X-EOPTenantAttributedMessage: 0bc7f26d-0264-416e-a6fc-8352af79c58f:0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CPH1EPF0000051E:EE_|GV1PR08MB11145:EE_ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 68c1d720-d886-48ee-08c0-08df1ee4f9ec X-LD-Processed: 0bc7f26d-0264-416e-a6fc-8352af79c58f,ExtAddr X-MS-Exchange-AtpMessageProperties: SA List-Id: svt-core@virtuozzo.com X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|48200799018|9140799003|32142699015|376014|61400799027|16102099003|10067099003|56012099006|5063699009|4113699003|5113699003|4143699003|22082099003|18002099003|55112099003|13003099007; X-Microsoft-Antispam-Message-Info: VY4G6GsieKep6pT/XJlTWJn9y0P5aFpKONwIX4twxr6ysupA3mLETui0swOGgXM5D2GKxiuKf6uKQ5AJPEsWrQtnXbMpjfAf8qCSHQ5bMJHvB5SdVGVqeHsmx1RqFDR0tmQYg+FrVLojZ3jfBAexMKAk6pQ87Lb2lhLTW113HFXXjBsx+LwaRjZC4AvfnkqB+zCiogiZZ0J2SaJ7Bu1Q5DGzmo6ET8etfVMJyjh8VtoQ6tTmqoEeeWzXdJ7NLys8gIAlklw7cBVgR2l7kHhnUwGZHGLimnhjC6LG10xCIFY0JQLQMjQ0kpGqfXIEzgeroX4Tz62RiQufR3DthKXXH113iJvH3AMjQ2K42xjmsmF88qYo+O3tGzqBcqtsJiPPyC10BYJJAo503zAJ19+M35C95thGK6+2UbjP0XhBy4SYoB4N5Udn+4hzalQ3bqK205DgEnfLY97gejcqpk8NR531G0jsWveA460e3n2Rf8FgMJD4szUI06AL10Z9RAnI5B/kaYHkgQiMw36wYHrSupxcxbPREtDLBAD1y+h/SO+rXvgo3AFVqma1ZAzwa5a7EKSY+2R9xiO9leauI96o6M1V+drYgEPXTGly5Gzu4A55gw4nt8aGaDnh0EjkQP/3Exf6mQZo+ZrwLi0iOQIdy0bCx2fXEEmXUaOZL/4bG0qwqxkfdTjYOf9cCb0pZJxO5Ek6lSmBzNJHtrvf2B1rbpq6SxLb3+31NGWVDcop4Gc7tZ6DYd795z2OmdmNWanUI0229bPMWCG0KhtKodf/LOLVAMh3/snx0HW9v9TJqQgMKUYGWYrn2d0k8lqDEeJ11oJON9O4op1242HKq7GOLAN05k2qEhPatCxnugtOqv93EqQDh7M1A6ZhzMs6inVN X-Forefront-Antispam-Report: CIP:69.169.224.2;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:b224-2.smtp-out.eu-central-1.amazonses.com;PTR:b224-2.smtp-out.eu-central-1.amazonses.com;CAT:NONE;SFS:(13230040)(48200799018)(9140799003)(32142699015)(376014)(61400799027)(16102099003)(10067099003)(56012099006)(5063699009)(4113699003)(5113699003)(4143699003)(22082099003)(18002099003)(55112099003)(13003099007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JMmyF+Ggs/sB9vAYlk+3xaMZksCZoUFP/ikn/2kPUqr9wzzDTmp4nStAePFXo0D/LH1f7B9fDe0bH8ejkA4OzCI9I/gLV5I0TqefEXni5fWYIcH0LQ8jXIsEnx6UZ8lXGId57PjKbnppm3SNJfQ0xkU9bleq6qP0D8Zkkum/suonPCA4ceB5Xy3QId3D204TCSxqO76ijgrhMY/wCS0aoZ0O61gnBvH07cIggMJ6tNnumjmqjvyKEei7oZKMqCrYNhVPNQ7gAZC5KIU53f0GFJapdNJCE/xwCKInMFpGUtLUqNCvYk67OWf058QfAr+BL3XRU47f1VkRyY7puJvtJ1J2xPhBmLELvW9H//l9TFEZ76mVrAAeZBV3zrt+l92HJ096rHtrVezUhuMqSHfl2uVil215sXemiMOkPgXPoOBlZ7qmEg2BcOoxJI6FuLVQ X-ExternalRecipientOutboundConnectors: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-Auto-Response-Suppress: DR, OOF, AutoReply X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2026 11:21:30.3000 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 68c1d720-d886-48ee-08c0-08df1ee4f9ec X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-AuthSource: CPH1EPF0000051E.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB11145 Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: - [Low] block/commit: unallocated zero span is still capped at COMMIT_ZERO_= CHUNK despite comment -- commit 1c010ab0f99a89e08cf4922150238581339cd7aa Author: Denis V. Lunev block/commit: batch block-status queries #VSTOR-134085 This patch changes commit_iteration() to query block status for the whole remainder of the image and cache the answer in a CommitStatus owned by commit_run(). Copying of allocated data stays bounded by COMMIT_BUFFER_SIZE. Zero spans are bounded by the new COMMIT_ZERO_CHUNK. > diff --git a/block/commit.c b/block/commit.c > index a2e807288b23..80b89e6269d8 100644 > --- a/block/commit.c > +++ b/block/commit.c [ ... ] > @@ -129,26 +144,46 @@ static void commit_clean(Job *job) [ ... ] > + ret =3D st->ret; > + bytes =3D st->end - offset; > =20 > + /* An unallocated span costs no I/O, so it is crossed in one step. */ > + if (ret & BDRV_BLOCK_ZERO) { > + bytes =3D MIN(bytes, COMMIT_ZERO_CHUNK); > + } else if (ret & BDRV_BLOCK_ALLOCATED) { > + bytes =3D MIN(bytes, COMMIT_BUFFER_SIZE); > } [Severity: Low] This isn't a bug, but the comment and the commit message don't match what the code does. The comment says "An unallocated span costs no I/O, so it is crossed in one step", and the commit message says "an unallocated span is crossed in one step". Can a span that reports BDRV_BLOCK_ZERO without BDRV_BLOCK_ALLOCATED still be capped at COMMIT_ZERO_CHUNK here? bdrv_co_do_block_status() in block/io.c returns BDRV_BLOCK_ZERO without BDRV_BLOCK_ALLOCATED in two cases: - A supports_backing layer that has no cow_bs. - BDRV_WANT_PRECISE mode with offset at or beyond the backing file size. This can happen when top is larger than the backing of base_overlay. For these spans, commit_iteration() takes the first branch: if (ret & BDRV_BLOCK_ZERO) { bytes =3D MIN(bytes, COMMIT_ZERO_CHUNK); The later "if (ret & BDRV_BLOCK_ALLOCATED)" test is false, so no I/O is done, but the span is still split into 256M steps. Each extra step goes through block_job_ratelimit_sleep(), the job_is_cancelled() check and job_progress_update(). Only the fall-through case, where neither flag is set, is crossed in one step. Should the cap apply only when both BDRV_BLOCK_ZERO and BDRV_BLOCK_ALLOCATED are set, or should the comment and commit message be adjusted to match the current behaviour? --=20 Sashiko AI review =C2=B7 https://sashiko.vzint.dev/#/patchset/2026093011173= 9.3866427-1-den@openvz.org?part=3D3