From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <010701a1a6d3d79c-cbcec1c8-ebe1-40ca-a26c-0e18ee952075-000000@eu-central-1.amazonses.com> Received: from MRWPR03CU001.outbound.protection.outlook.com (mail-francesouthazon11021099.outbound.protection.outlook.com [40.107.130.99]) by lore.virtuozzo.com (Postfix) with ESMTPS id 7A6CC8045D for ; Wed, 4 Nov 2026 13:51:10 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lyszWbE2MyTS4QeqypbY2hC5hbP/AY1XD0gSYR9f0jnfcpeRnrRZ6oT8iunc7LkM/Xb8HU2DBxGvf4X8GqgUPMU1aL4IENfOiDxyXnhexo+kfzv46kybPdYjAI+gxvCOmxza3GncQpXhN9tr7GzHsHi16xzJAn1sSksbTWVhQuQVZVhEADyBJGRTIEQSuEHFBxASuo2PHBaj3cipcwf7l4mImd3CCRxx1x/QnuyiBmjS1OsPi6NLRwxgWKAA+gxhPyxU3oQACz0D57SQdeKb/ueT22mnguWuKPbe7e99qb/lJg5gyPC2Nbqy8DxJPptPq/W/cdJgTzc5h5vlFhBVQg== 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=L+6TlWeOChm7T+LbR3Xvu6dGaTSfNS6PUnBCvzmZJcg=; b=lLBb1uXxsVpsgb8E5x4zfa5C2cGn+pQAb0aVI/U2jt0rHXNn/nQ+z6qTXcBxcXTa0H0/l7sSWvxw7Nk9/E3ycnmSoQZn3WmnKdfFWQwzEBuZVa9NLvhTHGvJghXmVYcafTUc+YRGpyEQRlxC7VuUtzrs011AnasVi7N46lRsj6K6DWbLVKC7A5oircT9Ek87FzFm6BVn1n1Kj7CRMXl6ZnqQZ2U0DKc3GZHqjyRLc4EYuNNmU5UX9Vg9npXLUg2UtQe221DFPi70UD2osj/3S7j83XHMv+cJc1C8jDFnhjxzwbEnr25+OtvCpUFAyHoGRHN1IdbeOgJDrIwUqMNc+Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 69.169.224.6) 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=L+6TlWeOChm7T+LbR3Xvu6dGaTSfNS6PUnBCvzmZJcg=; b=IxdOT5dyUJxpQvr8rf6uDsn8c7HYnBEjQDjE9KC4/ReLPL2lqQrei+qPcX+nXfv0L/nXooXF7yqGqqQ1YNn87cL2xhAQYgWnWzk+gk+52+kpZMjs3vW/AorqWXHdnuSAss9DZxc3LSl+0xmz/HMe/sHLremP2tknW7p740CCuh0= Received: from AS4P189CA0023.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:5db::11) by AS8PR08MB8568.eurprd08.prod.outlook.com (2603:10a6:20b:565::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.569.12; Wed, 4 Nov 2026 13:51:04 +0000 Received: from DB3PEPF0000885F.eurprd02.prod.outlook.com (2603:10a6:20b:5db:cafe::66) by AS4P189CA0023.outlook.office365.com (2603:10a6:20b:5db::11) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.592.10 via Frontend Transport; Wed, 4 Nov 2026 13:51:04 +0000 Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 69.169.224.6) 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.6 as permitted sender) receiver=protection.outlook.com; client-ip=69.169.224.6; helo=b224-6.smtp-out.eu-central-1.amazonses.com; pr=C Received: from b224-6.smtp-out.eu-central-1.amazonses.com (69.169.224.6) by DB3PEPF0000885F.mail.protection.outlook.com (10.167.242.10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.592.5 via Frontend Transport; Wed, 4 Nov 2026 13:51:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=23yjbh4k34hwzfubhuiim7m4inbd3ick; d=sashiko.virtuozzo.com; t=1793800263; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=k0tg+ok2bgripUNIg8fVD5eVDioIIO/FNcrOJWyY2XA=; b=X0LtwGCFhYGax0Y0wHYXcGjpBW6kQY20O19YcqqdcKUPZEgK9QWJywhj3too4Boh 3ebXQm9xnrcmspM9Ua/AseDKT2OiW2L40cueAgHFC5u4S+iiNPs8yhMLXmWw17c5VOU XLYfcMv4fkaLHa0rcMXTSEvpq5iDJDvuo7nhUGtHwJA6gmcXzTlVECTGmNChmNgxjvJ UI1lyyHBD6K62/bu0XMig/tbxP+F9mrXznNpSgMyOI4ASz5CcBO17w6E+cxZum2YNti bPsEN5LrW7gRhbt7RtM+gr9r//C/uFYna3N72ofiHMP/oeaV1qXNIcUocjrjzT3xaGD iY5glxQ3Mw== DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=qftdzk2dqsatjnlrq4r5brjbihpfcrsh; d=amazonses.com; t=1793800263; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date:Feedback-ID; bh=k0tg+ok2bgripUNIg8fVD5eVDioIIO/FNcrOJWyY2XA=; b=DT8XqR22bKgt21YQ0IMFHOscVp/O23rvU5f5FI+7way4z7IFwmt1fH3N/0XmvZYM nS3B0h8JRlyZjAtpfUbU/HVzhfBXP3CFEbHQfBpNyBE/TJFhKXQlLF61JPS4xi8l3KF iiVyCWVT9Le4wTYqE70B6ZL/HJZz5B6M09OKTuhg= Message-ID: <010701a1a6d3d79c-cbcec1c8-ebe1-40ca-a26c-0e18ee952075-000000@eu-central-1.amazonses.com> From: no-reply@sashiko.virtuozzo.com Subject: Re: [PATCH hci-dev 2/6] block: notify the parent when a replaced child has a different size #VSTOR-130961 To: andrey.drobyshev@virtuozzo.com, "Denis V. Lunev" Cc: svt-core@virtuozzo.com, den@openvz.org In-Reply-To: <20261104134539.1519657-3-den@openvz.org> References: <20261104134539.1519657-1-den@openvz.org> <20261104134539.1519657-3-den@openvz.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 4 Nov 2026 13:51:03 +0000 Feedback-ID: ::1.eu-central-1.2wRQJBpg9g1fGRYexx3dUuYGS25Bux+2TEOx72/m6U4=:AmazonSES X-SES-Outgoing: 2026.11.04-69.169.224.6 X-EOPAttributedMessage: 0 X-EOPTenantAttributedMessage: 0bc7f26d-0264-416e-a6fc-8352af79c58f:0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB3PEPF0000885F:EE_|AS8PR08MB8568:EE_ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 63518486-35b8-4149-4ba3-08df3a7aab2a X-LD-Processed: 0bc7f26d-0264-416e-a6fc-8352af79c58f,ExtAddr X-MS-Exchange-AtpMessageProperties: SA List-Id: svt-core@virtuozzo.com X-MS-Exchange-Transport-Rules-Loop: 1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|704161411799003|9140799003|48200799018|32142699015|61400799027|376014|261021123027099003|261022105027099003|261021121427099003|261022075727099003|261009223027099003|261026140227099003|261026135527099003|261026121527099003|261028144727099003|4143699003|5023799004|10067099003|5063699009|56012099006|22082099003|18002099003|261102123227099003|55112099003|5113699003|4113699003|16102099003|13003099007|261102130727099003; X-Microsoft-Antispam-Message-Info: =?utf-8?B?T1JZTTVDWHgrNDlhVklrQWhPeVltQkpkWDRwbFkzNWNGS0VpZU1ZRU9uOFVQ?= =?utf-8?B?cklLekJHdEt6NjFtNVhSWjM1OXBIVU9BY2NlYUNPVk9wKzB0RU4vdmtCV1g3?= =?utf-8?B?bFZrOVhMZFUrNHQ0R3d5WkZLZ2VVY0dyaVVPUGxBUFNieUJicVFBdGVDR3R4?= =?utf-8?B?eFJjeGV3cEtCNTF1UnJYN0xvWGcxckZrR0hHaE8wSHBpT0h0RFdWeXduMmdl?= =?utf-8?B?cUZtRmU4azREaHV0OGJJM1FRaGRZdU1zaEd3WE5UbEFTYjRnMDhmN0RGdkx6?= =?utf-8?B?aWVnYzZPTGR5WWZqZnkxZE5IOUw0YXFsZ3NLRGYvUFJYbEcrVVZ6VVp6Q01D?= =?utf-8?B?bGtGamVqRXpzeWQzRWtJempMbkdxcWhnM0Myb2JFbCtJYzJHQ1RpbjFMTWhS?= =?utf-8?B?cm9YQUczRFpUU3hXUncra3VocnRBck9ZOWthU2ZaQjFWRFJ5TCs5OVV1b1dT?= =?utf-8?B?T09RMDdFRUFmc0ZyejN5NkM4Tk94K01xSklVSFJhdytrQmZickdJREs4QzhJ?= =?utf-8?B?N2Y2Z3dCSzVWWmlCUmdpNit3TkRiTzRIOUxvVm5TdUEwc2tVUkpvZHQrcE9x?= =?utf-8?B?ZGxPWml2R1NWZlpaR0w1d1hKeTJ5SFNLRVF0OWdja0JPN3M5M21vdkZNLzVW?= =?utf-8?B?Vm5RcWp5TVZtSk5iOHU4YmlaQUFvbzBrSnFlNU1tSWkxdFhLV0lyN01VQVhs?= =?utf-8?B?ampuL0ttSWk5WlBldFpLLzdvZ1dpdURxL1JIQng0MlJXZG1heHBkYlQ0UnhY?= =?utf-8?B?QWdFZk9YNHJyR2VGOHZSalFJOHVMYnZPTUJQNmg2YU5mOUN1RTRwK3htcmdG?= =?utf-8?B?TVZXM0plbnNpZ2poeklaek5oT05ScHJKQ1F6em1vMkp4S2VWVksxb1AxZHNZ?= =?utf-8?B?TnFvb3FtM0hMSU5naDgrWExuMmtKRGNBeVpQSFBQNGJMaWtGOUo3YllnOTZ6?= =?utf-8?B?NnJsK3ZPKytKV3dsYWVOM21YY0JlRitKclJxNWc4QVRrb3kzWHVNVy9QcU5q?= =?utf-8?B?L0drb3RWZS81Y0hibVJUbVdvR3Z2TVZBdDhnWjNZVHJaUGc2ZUFCNTIrVDRz?= =?utf-8?B?QVlpazc5MjZDTGdvNkhla0VTaENsbnk4YmVMQWk4aEFmeEIxN2VCcWdWd3BT?= =?utf-8?B?cEpxMXUvT3RNZnRGa2xSdTBTbkFhN1kxSEI0TDRDTXdWZDRCSWQ3REN0d1BU?= =?utf-8?B?SEo1WllvMU1TY3BwendSNzNvKzZoeVFIMng4ZEJUcUo3ZW1qcmQwM2tjR2VL?= =?utf-8?B?dzZ2c1dFNllMUHo4b2xCMGFyR0gwQ1k5cWhZNXcwaWhlZ3pSK0oxTTFtTXhQ?= =?utf-8?Q?XT5EOWHrL66Nw=3D?= X-Forefront-Antispam-Report: CIP:69.169.224.6;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:b224-6.smtp-out.eu-central-1.amazonses.com;PTR:b224-6.smtp-out.eu-central-1.amazonses.com;CAT:NONE;SFS:(13230040)(704161411799003)(9140799003)(48200799018)(32142699015)(61400799027)(376014)(261021123027099003)(261022105027099003)(261021121427099003)(261022075727099003)(261009223027099003)(261026140227099003)(261026135527099003)(261026121527099003)(261028144727099003)(4143699003)(5023799004)(10067099003)(5063699009)(56012099006)(22082099003)(18002099003)(261102123227099003)(55112099003)(5113699003)(4113699003)(16102099003)(13003099007)(261102130727099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4YrdA2Xhmk5FJxtCs5aq9/C+ESSqCF8PJJM++hdlyRqqTLRp5LkGKEC0A2PHKjIMiM6X0RluNdCkBs3z1osWT8QqObuw0Nasu6ozy14VfKq6mdlSqYQRaffvnD+XRoXOOh9Dcy51hu39D19d1fcFLLAhPJDy+7cbS2UCXGyfYAc5kUkIwsY7ovQoSbpZBKx+Jb+hbbV7e/EDXfcameupXVK3B5YvXCpYLlX9hlWTCrU2LYExu3FzSSt7wtqgwNy9lvaqjvine0pw/DveUg3DPX516ZK7qL/D6aF4iDXO+bkjdliHetL9ZbsbwVXCDf8gIb8SVLzBqMhv2L7clbmUS0Sn/gx+TQ9ycqB+L7+4XsOLLf3VmTzDYfV0HTcT0m1nJcZR8FKzyPeBh+FJFiUizouuVIC9y0KSOFFfVQ+cKAG18o+fvmNhR87np6BQST/j X-ExternalRecipientOutboundConnectors: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2026 13:51:04.1116 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 63518486-35b8-4149-4ba3-08df3a7aab2a X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-AuthSource: DB3PEPF0000885F.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8568 Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: - [Low] block: bdrv_replace_resize_commit() notifies all parents of new_bs -- commit 1388b90801798d7d441e56e99ea5745089939495 Author: Denis V. Lunev block: notify the parent when a replaced child has a different size #VSTOR-= 130961 This commit makes bdrv_replace_child_bs() register a transaction action. Wh= en the transaction commits, the action compares the lengths of the old and = new nodes. If they differ, it calls bdrv_parent_cb_resize() on the new node= , so parents that cache the child size learn about the change. > diff --git a/block.c b/block.c > --- a/block.c > +++ b/block.c [ ... ] > +static void bdrv_replace_resize_commit(void *opaque) > +{ > + BdrvReplaceResizeState *s =3D opaque; > + int64_t old_len =3D bdrv_getlength(s->old_bs); > + int64_t new_len =3D bdrv_getlength(s->new_bs); > + > + /* A parent caching the child size has to learn that it changed */ > + if (old_len >=3D 0 && new_len >=3D 0 && new_len !=3D old_len) { > + bdrv_parent_cb_resize(s->new_bs); > + } > +} [Severity: Low] Is the notification broader than the commit message describes? The subject = and body talk about notifying "the parent" of the replaced child. However, = bdrv_replace_resize_commit() calls bdrv_parent_cb_resize(s->new_bs), which = wraps bdrv_co_parent_cb_resize(). That function walks every entry in bs->pa= rents: block/io.c:bdrv_co_parent_cb_resize() { ... QLIST_FOREACH(c, &bs->parents, next_parent) { if (c->klass->resize) { c->klass->resize(c); } } } BdrvReplaceResizeState records only old_bs and new_bs, not the replaced Bdr= vChild. The old_len versus new_len check says nothing about the other paren= ts of new_bs. When the commit action runs, the replaced child is already a parent of new_= bs. Any other BlockBackend, export or device model attached to new_bs also = gets resize(). Their view of the size did not change. Can this send redundant notifications to those parents? For example, virtio= -blk would get an extra config-change interrupt. scsi-disk would report a s= purious CAPACITY DATA HAS CHANGED unit attention. Would it be better to notify only the parent that was replaced, or to descr= ibe the broader behavior in the commit message? --=20 Sashiko AI review =C2=B7 https://sashiko.vzint.dev/#/patchset/2026110413453= 9.1519657-1-den@openvz.org?part=3D2