From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from DU0PR08MB8304.eurprd08.prod.outlook.com (2603:10a6:10:40c::10) by PAXPR08MB6942.eurprd08.prod.outlook.com with HTTPS; Wed, 16 Sep 2026 15:24:57 +0000 Received: from PAYP264CA0030.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:11f::17) by DU0PR08MB8304.eurprd08.prod.outlook.com (2603:10a6:10:40c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.428.7; Wed, 16 Sep 2026 15:24:52 +0000 Received: from ZR1PEPF0000E6AF.eurprd05.prod.outlook.com (2603:10a6:102:11f:cafe::3a) by PAYP264CA0030.outlook.office365.com (2603:10a6:102:11f::17) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.428.11 via Frontend Transport; Wed, 16 Sep 2026 15:24:52 +0000 Authentication-Results: spf=softfail (sender IP is 99.81.216.78) smtp.mailfrom=openvz.org; dkim=pass (signature was verified) header.d=openvz.org;dmarc=pass action=none header.from=openvz.org;compauth=pass reason=100 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning openvz.org discourages use of 99.81.216.78 as permitted sender) Received: from nat.eu.perception-point.io (99.81.216.78) by ZR1PEPF0000E6AF.mail.protection.outlook.com (10.167.241.86) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.428.7 via Frontend Transport; Wed, 16 Sep 2026 15:24:50 +0000 X-PERCEPTION-POINT-VERDICT: CLN X-PERCEPTION-POINT-SPF: X-PERCEPTION-POINT-SPAM: PASS X-PERCEPTION-POINT-SENDER-IP: 2a00:1450:4864:31::11 X-PP-Forefront-Antispam-Report: CIP:2a00:1450:4864:31::11;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail-wm2-x11.google.com;PTR:mail-wm2-x11.google.com;CAT:NONE;SFS:(13230040)(6059299003)(12012899012)(43022699015)(2092899012)(3072899012)(82310400026)(5063699009)(5023799004)(10067099003)(13003099007)(19002099009)(57112099003)(18002099003)(55112099003)(16102099003);DIR:INB; Received: from GV1PR07CU001.outbound.protection.outlook.com (mail-gv1pr07cu00102.outbound.protection.outlook.com [40.93.214.98]) by inbound-smtp.eu-west-1.amazonaws.com with SMTP id 2drhfkt8r2vs3t3lal9e9li2rsva51sug2kji1o1; Wed, 16 Sep 2026 15:24:48 +0000 (UTC) X-SES-Spam-Verdict: PASS X-SES-Virus-Verdict: PASS Received-SPF: softfail (spfCheck: transitioning domain of openvz.org does not designate 40.93.214.98 as permitted sender) client-ip=40.93.214.98; envelope-from=den@openvz.org; helo=GV1PR07CU001.outbound.protection.outlook.com; Authentication-Results-Original: amazonses.com; spf=softfail (spfCheck: transitioning domain of openvz.org does not designate 40.93.214.98 as permitted sender) client-ip=40.93.214.98; envelope-from=den@openvz.org; helo=GV1PR07CU001.outbound.protection.outlook.com; dkim=pass header.i=@openvz.org; dmarc=pass header.from=openvz.org; X-SES-RECEIPT: AEFBQUFBQUFBQUFGcVVyY1drZWE4d2M3dXdOSVJxbWVFclQ3RVF1KzE5Y0YzTTE1QTkvOWFiVGZMaUt0c0d2UFdCM1czajhjalB1cEE0VWpLNDFZSk81eVpKWTVtNTI4dFBLemJNN3E3b2F6bTE3aHhxLzhaODVwVEZ0OHEwdS91NzBwV3NZeWxwWXV5Z3ZyQk9DcHR1M29iV2pRdTJDYkVKMUN6VFFIK2dRZzdBMDc1QmdQOVRPNWVjek9idkxLWGJ3d3BwNEFUcFVQY29laTIwaEtOakxWZzRFQTFBL25rcjZpVXBuVGlQamo1ekh2YzNlVE1Zc1AzZFlsZnhTZlBmWVZZU1dzai9CTnZIQm1xdWp4VHRPRVVJZk00a3RxNWphS1BQbFlZR05rbE1SbndUdnNZRWc9PQ== X-SES-DKIM-SIGNATURE: a=rsa-sha256; q=dns/txt; b=VMeHHqDL/TJcubkISPpEzD7wYJB0hQhcuM2xPu4gtvdgvAKeNmldtCoEJ1kiaIDoV6GEQJILMbH3WeEFhc6zuODihZ6L+UPRk2Pr0eEwwmcSn4guMBMzaHE9Z0jWUecL12aw3jOC+K3qWAuiXeI6KhppSGT1JsOuazGvyCnHDgQ=; c=relaxed/simple; s=shh3fegwg5fppqsuzphvschd53n6ihuv; d=amazonses.com; t=1789572288; v=1; bh=sNF3rRPPb25uRZdVIeCisWZm2i2h82VqDe0Xy2UnENI=; h=From:To:Cc:Bcc:Subject:Date:Message-ID:MIME-Version:Content-Type:X-SES-RECEIPT; Received: from DU2P251CA0015.EURP251.PROD.OUTLOOK.COM (2603:10a6:10:230::19) by PAXPR08MB6717.eurprd08.prod.outlook.com (2603:10a6:102:131::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.428.11; Wed, 16 Sep 2026 15:24:41 +0000 Received: from MA3PEPF00000409.eurprd04.prod.outlook.com (2603:10a6:10:230:cafe::75) by DU2P251CA0015.outlook.office365.com (2603:10a6:10:230::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.428.11 via Frontend Transport; Wed, 16 Sep 2026 15:24:41 +0000 Authentication-Results-Original: spf=pass (sender IP is 2a00:1450:4864:31::11) smtp.mailfrom=openvz.org; dkim=pass (signature was verified) header.d=openvz.org;dmarc=pass action=none header.from=openvz.org;compauth=pass reason=100 Received-SPF: Pass (protection.outlook.com: domain of openvz.org designates 2a00:1450:4864:31::11 as permitted sender) receiver=protection.outlook.com; client-ip=2a00:1450:4864:31::11; helo=mail-wm2-x11.google.com; pr=C Received: from mail-wm2-x11.google.com (2a00:1450:4864:31::11) by MA3PEPF00000409.mail.protection.outlook.com (2603:10b6:140::19a) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.428.7 via Frontend Transport; Wed, 16 Sep 2026 15:24:40 +0000 Received: by mail-wm2-x11.google.com with SMTP id 5b1f17b1804b1-49e6598dd44so6143695e9.1 for ; Wed, 16 Sep 2026 08:24:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=google; t=1789572280; x=1790177080; darn=virtuozzo.com; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=NUKpJyw/y+17v1w6v8CgVzAC7bJEotN+LfdqB1aW+/4=; b=YMF5kzalFP1S7zzkr9WgDTsUBdOlTCs9H7suHozMD2OZHKqLf2JErXV1DwehpjVtaR VKtkTvkax2wDmH1GRt0RpZBBwvhmkpQr6dIt4mAWrJWoecEkKxDXVr558nYezDbOZVu9 +bLJBs3kcHdvb4VzWOyWF2qPQfaiwNwIAVqV48K+0Y49BJGoDym0yq+CAKMwVW2FLTm5 8pTFSL69ntvketXOsNcwnYbT2YXt2ArAsgNd1lnxMFpctXa1c1pUGW6AGrGmSSWyzhoR n8WSl7FkCc675E1Og8bYH4hhNUAYucqan7+/Vv/5WPPuA5IKSfD8iJ0TVhVS5m0qbrsO pf7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789572280; x=1790177080; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=NUKpJyw/y+17v1w6v8CgVzAC7bJEotN+LfdqB1aW+/4=; b=NA/99kUptWPkkcxdGLycVZHLFcV0yok+KgJAkF9LUpgCA/2Ip7qwa+ZzvGudKcEp3M 5R1zcHFH2WxzcRi0iwtAdUAZ9Ds4KEXvyUADGBdaGAZNBWxPPp4lJYRfpBUxjahOyjF5 eesVfoZeg47IFhZCudZHg/VS14H9vChhaZ/GLxx7iNBlmQ/F7Om5Clq86/S8JeaxANwf BYByuIQm++rY2eIl3M8gHhjkEcOS0lekxR2NWkI/tu0B2T9GKlwb3rqCEiYk7gMHpqQO aZthhaBwqKzZbZ4xuu9FKnaApzHyTaNsakwpsvgzX0gbOe38LxKTbRIuSdjG3ifhwk+x wc5Q== X-Gm-Message-State: AFuF++nujC9b6oV5fYV4xix+IztJ3+4Z4fR2A2V380ZU7A9CsTnsKr56 V/1fA4XG7He2bTAEnDuQE9WGY0Z/+DNPBOmfIjpRmviOsccNA8H60Vom1DlN5t4JaP8+45eldv2 Ni/D9qlY= X-Gm-Gg: AYBFou19D7XG5uaMV7LtSjpKIC2dyYpKNlQOmlf1N7ZkAK5oCQ+3MB7MsWgWyiiIkXL l76TbZ/kq9SgjQ8Up50IMZ1nK+3Nd9E0cmr+tuC4k9FUekjT5sEDtOjfWUqNGtyafMXbZSAxcDy Gxudns/nSSh0D7EdJejst7C8HL6ga2I9wLFy4uRUwn0I1LKR9X7DnW5vJr4bQ53KLb8HGyyuCuj 2ino4xGJSogYYt6oE7AVynNMgyHvVdXfNaG41VnXqTVzNXjg09R/eGikJTCgQM/Auq1Msc/PoLR gXZ2qrw/9HDK2zEZhPeIldgbkCifphXwmtn9guRb5Z/5R0S4OlSs1WQSTOuZ2aUYZYq9MxVaTeN yrw8TarKdp+GiO/Tbxu5pizlCsi1vp8ep3h/f8tVT755zOyyUJYBIQioPV7mWnNZnQ+SZBJGG0v LBwoBCMGDxP/zU8UuRv4Dzp4bbVJ+lFzserYhnDUoz7yqjMJI0MqQJhdy28kihgNPfma/P X-Received: by 2002:a05:600c:1392:b0:49c:fa20:cc02 with SMTP id 5b1f17b1804b1-49eb732df6amr34503875e9.25.1789572279723; Wed, 16 Sep 2026 08:24:39 -0700 (PDT) Return-Path: den@openvz.org Received: from athena.sw.ru ([2a06:5b06:b600:300:f56f:c51e:c53f:b1ce]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49fbd0c39dcsm1836415e9.12.2026.09.16.08.24.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Sep 2026 08:24:38 -0700 (PDT) From: "Denis V. Lunev" To: svt-core@virtuozzo.com Cc: andrey.drobyshev@virtuozzo.com, den@openvz.org Subject: [PATCH hci-8.0 0/5] qcow2: silent corruption when a dirty image becomes writable Date: Wed, 16 Sep 2026 17:24:32 +0200 Message-ID: <20260916152437.1787889-1-den@openvz.org> X-Mailer: git-send-email 2.53.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 1 X-EOPTenantAttributedMessage: 0bc7f26d-0264-416e-a6fc-8352af79c58f:1 X-MS-TrafficTypeDiagnostic: MA3PEPF00000409:EE_|PAXPR08MB6717:EE_|ZR1PEPF0000E6AF:EE_|DU0PR08MB8304:EE_|PAXPR08MB6942:EE_ X-MS-Office365-Filtering-Correlation-Id: 586e2470-75c1-429f-243b-08df1406a6ff X-MS-Exchange-AtpMessageProperties: SA|SL X-PERCEPTION-POINT-CUSTOM: vzpp X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|6059299003|12012899012|43022699015|2092899012|3072899012|82310400026|5063699009|5023799004|10067099003|13003099007|19002099009|57112099003|18002099003|55112099003|16102099003; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?JHE3kwP/fQHP3iKbDIU6RxDC739J8FzFyojcnbZp+QJnjZuHCpdCdFmZIm+p?= =?us-ascii?Q?foiNL1HhmOdPn2+472P5svYsINAXMAjwsN2ZNmYwRkPwi6fzRzfci9B8z04g?= =?us-ascii?Q?uV+br6t9/UC6OvXBKbGNgkJ45bRdaA24Jh5gObCp5pnRIq4fID0fzvkhG7sb?= =?us-ascii?Q?MZFMrBsgLOo5hDV6Hg0qrYMRISjxDm25Pqi4oGDcSdjBxppAKVOdXEJwjOV8?= =?us-ascii?Q?LS1MWZouf7/naQuXkw8EPsiWlFKqfSnkREiVIGtR61bHTGDnZfW6l6sqZDkt?= =?us-ascii?Q?5sbY9OhWXpWYFqhCjq4dMVhfSfnxiKiLVkpGZJVkkUxQ4Nd/Y3ipIQWrKCri?= =?us-ascii?Q?JPQ93sZSEKLnrw3NA9NJn+26OeqdTusRNzkqTcks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SKAupyjmcVaL8U?= =?us-ascii?Q?LyAV0s7v0eexmDLG4ZWXZzy6ZdsErE0Is+m89/Rfz4OGyq55z/CO4egOt5JW?= =?us-ascii?Q?Aadoa+2s/QtTvANj4zxKm5p+X5cJbWr/CbaXYfOiKC9ohltxP/psRvLvAF1E?= =?us-ascii?Q?Grw=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:2a00:1450:4864:31::11;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail-wm2-x11.google.com;PTR:mail-wm2-x11.google.com;CAT:NONE;SFS:(13230040)(6059299003)(12012899012)(43022699015)(2092899012)(3072899012)(82310400026)(5063699009)(5023799004)(10067099003)(13003099007)(19002099009)(57112099003)(18002099003)(55112099003)(16102099003);DIR:INB; X-Auto-Response-Suppress: DR, OOF, AutoReply X-Exchange-RoutingPolicyChecked: XBc8o21c15IYKk12PfuvGxdjbaTIiHqsT6ROEQBxZJu6wFA8qusNYCVKvurHai3geNjTOcVb3ue5krKSHYCaWnZgrHB2iTMRvZwe+biZTX9mo6IdQtMZOqOVq3E3kJMAduEs50CSxf1DsQ91CIr/JyoswFxgYN7bT02ypEEdfmVDrByraDp6+XpVjO8LKpaJqn62Oir1I2OVjF5H6Tqa70NRsnCB65v7Eg0YUT8gy4X8Ep3RioZ6fvXcnZcV/cdPaXgaWU/VDPa7LlxrSAgEVbhzJdOo9HSmxBvzLmHjoEWs+8+TS6b0f+comnShnAqaEtk/B25Y2twP1uJnHBqOmg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6717 X-MS-Exchange-Organization-ExpirationStartTime: 16 Sep 2026 15:24:51.3997 (UTC) X-MS-Exchange-Organization-ExpirationStartTimeReason: OriginalSubmit X-MS-Exchange-Organization-ExpirationInterval: 1:00:00:00.0000000 X-MS-Exchange-Organization-ExpirationIntervalReason: OriginalSubmit X-MS-Exchange-Organization-Network-Message-Id: 586e2470-75c1-429f-243b-08df1406a6ff X-MS-Exchange-Organization-MessageDirectionality: Incoming X-MS-Exchange-Transport-CrossTenantHeadersStripped: ZR1PEPF0000E6AF.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Exchange-Organization-AuthSource: ZR1PEPF0000E6AF.eurprd05.prod.outlook.com X-MS-Exchange-Organization-AuthAs: Anonymous X-MS-Office365-Filtering-Correlation-Id-Prvs: 9a1eca57-16a9-41cf-846f-08df1406a09d X-MS-Exchange-Organization-SCL: -1 X-Microsoft-Antispam: BCL:0;ARA:13230040|43022699015|12012899012|6059299003|2092899012|3072899012|82310400026|35042699022|5023799004|19002099009|10067099003|5063699009|55112099003|16102099003|57112099003|5133699003|18003699003; X-Forefront-Antispam-Report: CIP:99.81.216.78;CTRY:IE;LANG:en;SCL:-1;SRV:;IPV:CAL;SFV:SKN;H:nat.eu.perception-point.io;PTR:nat2.eu.perception-point.io;CAT:NONE;SFS:(13230040)(43022699015)(12012899012)(6059299003)(2092899012)(3072899012)(82310400026)(35042699022)(5023799004)(19002099009)(10067099003)(5063699009)(55112099003)(16102099003)(57112099003)(5133699003)(18003699003);DIR:INB; X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Sep 2026 15:24:50.5809 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 586e2470-75c1-429f-243b-08df1406a6ff X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-AuthSource: ZR1PEPF0000E6AF.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8304 X-MS-Exchange-Transport-EndToEndLatency: 00:00:07.0720099 X-MS-Exchange-Processed-By-BccFoldering: 15.21.0451.004 Content-Type: text/plain X-Microsoft-Antispam-Mailbox-Delivery: ucf:0;jmr:0;auth:0;dest:I;ENG:(910005)(944506478)(944626604)(920097)(930201)(20251009189)(140003); X-Microsoft-Antispam-Message-Info: =?iso-8859-1?Q?LEkMypcqY7F8v4nUsnvnQO2X7ZD9oOZDmWJTXuUSS62BnxffJ2+U1IyneE?= =?iso-8859-1?Q?gXJrSfyuP36iR9Sky+ewQQKOOO1hHAO3/y3e6EjOB3NXu1b5S8Q9TipvXr?= =?iso-8859-1?Q?9KfT5vlLM8Xn1fmfy/Ib2RcIclxi5TcXUsUEvetVkrP5C9VhHC2/rMBO0M?= =?iso-8859-1?Q?rgjgdnEkBsRaHXb8UoJEvBlaAOBwKMbmLBo6EjWysvl4B3JEZ2pdHNTCVx?= =?iso-8859-1?Q?ujugvkhRus9cf16oMULXXVRzKxXygda/QUfNYS2eeQf9J/Sb+g3jlfaWmS?= =?iso-8859-1?Q?cenMb2cZaBOJtJbpJinmV2XsXbEG8qcktDInJNiM/qgmMJHmf3Un/QuZXz?= =?iso-8859-1?Q?miLox76F2OPU5NgSPtiDwoepl/pxXHWmknyfA4So0xlirQumj9CUr2xZvy?= =?iso-8859-1?Q?oya2I241TP6T+GiGub6mbrSTaAOrXr3IE/MMNHIRgbBgXMkm1QfLUaZ2cb?= =?iso-8859-1?Q?AZYI5mwblamtWHLR4kkOsSlOIlQup+ffWpGl6YJfGuZtdtXDUtIMzUH1zM?= =?iso-8859-1?Q?dCNbwD4AKB+qukfN+TrSf4Qefv2ZS+Mxrc82z9qvHfDNbmL+PnBaSlFojK?= =?iso-8859-1?Q?s475NYkyYL7gcDu3/Lo8kpfje+TwNogFLOgQqFIhkAabwvBH0QqGylI3ne?= =?iso-8859-1?Q?apof6fvb724M+0Qw5x8VtwlJjpX97SrQQH/v/wHZediBjWfypOh9EOqamY?= =?iso-8859-1?Q?/u31yypwkdJTerFjeOtuq4rYRgf/Niz1OjPcdKOxu1SNRyippa9VH5HDxy?= =?iso-8859-1?Q?4BJGA39yCflCYiWYlJun0g+eEnKxZncQsPnRiOM4xV0BN24z2RcDRmG7JC?= =?iso-8859-1?Q?t7oz5gl5dlLl5EHWCKfnbRK3x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= =?iso-8859-1?Q?FTjKBZj/nonbTBdJMckJovBFV5royG++fpIB82saGrTtBZwBGpqFXXzQ0O?= =?iso-8859-1?Q?Y6PXGwuG4pIi5rLmZd1NtTuew/oN0KcFxfEPjrE0tGKqXwxno8ea+JxKja?= =?iso-8859-1?Q?ACX8KhZJqv59B3woj81yUixcs7oaCl8SHCP0r/ImMw=3D=3D?= MIME-Version: 1.0 List-Id: A customer volume was cross-mapped onto itself by this bug, so hci-8.0 wants the fix even though the upstream series has not been merged yet. The problem ----------- qcow2_do_open() repairs an image carrying QCOW2_INCOMPAT_DIRTY, but only for a node that is writable from the start: if (!(flags & BDRV_O_CHECK) && bdrv_is_writable(bs) && (s->incompatible_features & QCOW2_INCOMPAT_DIRTY)) { A node opened read-only skips it, correctly, since it resolves nothing and writes nothing. Nothing revisits the question when that same node later becomes writable, and bdrv_reopen() is not an exotic way to get there: commit_active_start() and commit_start() both reopen the base read-write for the duration of the job, so an ordinary block-commit onto a read-only backing file is enough. With lazy refcounts the refcount blocks are not written again once the dirty bit is set, so an image left behind by a killed QEMU has an on-disk refcount block that accounts for the metadata clusters and nothing else. Every data cluster reads as free. s->free_cluster_index starts at 0, so the first allocation after such a reopen starts at the front of the image and hands out clusters that L2 entries still point at. The result is aliasing: two guest offsets mapped onto one host cluster, so the guest reads back data belonging to some other offset. Nothing about this fails. No I/O error is reported, the corrupt bit stays clear, and a clean close clears the dirty bit as well, so no later open will repair the image either. The only runtime witness, if something eventually frees one of those clusters, is a bare qcow2_free_clusters failed: Invalid argument on stderr, with the guest none the wiser. How it looked in production --------------------------- A VM was killed while its storage was unavailable, leaving a 100 GiB volume dirty. It came back with a snapshot-revert overlay on top, so the volume itself was now the read-only backing file, and the overlay was committed into it two and a half hours later. 8082 host clusters ended up referenced by two L2 entries each, roughly 8 GiB of guest data cross-mapped. The guest filesystem began failing metadata verification on buffers holding fragments of unrelated files. qemu-img check -r all makes the metadata self-consistent again, and then honestly reports no errors, but it cannot un-alias anything. The guest data stays wrong. Reproducer ---------- Under a second, no guest and no block job required: qemu-img create -f qcow2 -o compat=1.1,lazy_refcounts=on base.qcow2 1G qemu-io -f qcow2 -c "write -P 0xaa 0 100M" -c flush \ -c "sigraise 9" base.qcow2 qemu-io -r -f qcow2 base.qcow2 \ <<< $'reopen -w\nwrite -P 0xbb 900M 100M\nquit' qemu-io -r -f qcow2 -c "read -v 0 16" base.qcow2 # 00000000: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb The flush is load-bearing: it writes out the L2 cache but not the refcount blocks, which is exactly the asymmetry the bug needs. Guest fsyncs supply it in production, so a long-running VM is the ideal victim. qemu-img commit of an overlay reaches the same state through commit_active_start(). The fix ------- Patch 5 repairs the image in qcow2_reopen_commit_post(), the earliest point at which the node is writable. That callback runs after the reopen transaction has been committed and cannot reject it, so patch 3 gives it a return value to report a node it has had to give up on, and patch 4 records the flags the reopen started from so the driver can tell a node that has just become writable from one that was writable all along. Patch 2 stops a reopen of a driverless node from crashing, which is how a failed repair comes back through commit_clean(). Patch 1 is the read-only header write that fails or asserts on a dirty image. The repair runs under bdrv_drain_all(), so a block-commit onto a large dirty base stalls guest I/O for the length of a full metadata scan. That is the cost of the alternative being silent data loss; rejecting the reopen would be cheap, but block-commit depends on it succeeding. Port notes ---------- This is the hci-8.0 port of the v4 series posted upstream on 2026-08-24: https://lore.kernel.org/qemu-devel/20260824133729.1141990-1-den@openvz.org/ It is still under review there, so the code may yet change. All five patches cherry-pick onto hci-8.0 with no prerequisites and no conflicts, and the diff is identical to the upstream one. One thing differs, in patch 5: hci-8.0 creates qcow2 images with zstd compression by default, so a fresh v3 image already carries QCOW2_INCOMPAT_COMPRESSION. The iotests 040 helper therefore masks the dirty bit out of the incompatible features rather than comparing the whole word, which upstream can afford to do. Built and tested on dev-cl04: iotests 039, 040 and 060 pass, and the qcow2 auto group is otherwise unchanged. vz-mt-vendor fails there only because that build was configured --disable-spice and so has no qxl-vga device for the test to instantiate. Signed-off-by: Denis V. Lunev Denis V. Lunev (5): qcow2: do not clear the dirty bit when reopening a read-only node #VSTOR-140073 block: reject a reopen of an unusable node instead of crashing #VSTOR-140073 block: let bdrv_reopen_commit_post() report a failure #VSTOR-140073 block: remember the flags a reopen starts from #VSTOR-140073 qcow2: repair a dirty image when it becomes writable #VSTOR-140073 block.c | 55 ++++++++++++-- block/qcow2.c | 33 ++++++++- include/block/block-common.h | 1 + include/block/block_int-common.h | 11 ++- qapi/block-core.json | 19 +++++ tests/qemu-iotests/039 | 110 +++++++++++++++++++++++++++ tests/qemu-iotests/039.out | 56 ++++++++++++++ tests/qemu-iotests/040 | 123 +++++++++++++++++++++++++++++++ tests/qemu-iotests/040.out | 4 +- tests/qemu-iotests/060 | 30 ++++++++ tests/qemu-iotests/060.out | 13 ++++ 11 files changed, 440 insertions(+), 15 deletions(-) -- 2.53.0