From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 1CA0E8017D for ; Thu, 29 Oct 2026 14:45:32 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69TEiGu1001327; Thu, 29 Oct 2026 17:44:17 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69TEiGu1001327 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="BVXUcGr3" Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69TEi22Z001294 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Thu, 29 Oct 2026 17:44:02 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69TEi22Z001294 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-48af4a0bd0fso1117616f8f.2 for ; Thu, 29 Oct 2026 07:44:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBwol2XsG6qyVwBWAHR/p00rzwbDkqQAnarwPYPVfKDhAVTjBgZNmw3ri2x9jGxLbKdKy6Qagw==@openvz.org X-Gm-Message-State: AFq9FYI6WHewaaahKURB/K+Wc+0snfVdNHItX7tc2bhXsHUYe3bM4qW2 nPMPSlwfRDAcq6Pez4WiXfk8YmOUxc6UYMPWoZGXRoV5emtzx+YJWsQP1ka7PUcqwI6bfzFEEM/ I/apo0iY+MKz10X4qinXfIhVISHbhQL5/QkjQi+N2SjbmQouoOTvt7Q== X-Gm-Gg: AYBFou02QuB54w6ZLhH2QgD21i7en6w9qB/VujGg1ObkYKB+DY+5UD29e6OnPiBpJRb YM5UEh8G2/qVm+NtL+0HO0JAHhUXbYVo56e/Gelou9Xpk0lXXSzm7bsVD2vMqHZTB8AKIyEb5Ce fff7XtEBF7pJE7Bq4fwpVxwmsd6eYBkMTvWsr7ZOQ1dNq66/FapcTBWurzAPKjs//aUgjx5oAF3 D+zvXTRy0Sxz5KScG4MAk2jjRSrMuBsBQXf+nq0MW2Dq6SgnjgWFSqMVYCKM6dgnadymJ1AAgek k3PdB+Ja/nkoNXA3H6KVxc7Hjor0JcRyl8hXR+UgGF70iQY/y5lPsQgUOkQQwRjTLMnt+OxdqbJ jSXAdjvzk/97hqDCJI61kv+HiqLhX X-Received: by 2002:a05:600c:8116:b0:4a1:f8cb:7d70 with SMTP id 5b1f17b1804b1-4a966e2c015mr125993285e9.24.1793285042191; Thu, 29 Oct 2026 07:44:02 -0700 (PDT) X-Received: by 2002:a05:600c:8116:b0:4a1:f8cb:7d70 with SMTP id 5b1f17b1804b1-4a966e2c015mr125992585e9.24.1793285041471; Thu, 29 Oct 2026 07:44:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1793285041; cv=none; d=google.com; s=arc-20260327; b=SLM/kZuGgiXbi0R6JObSki5aGcxWdB1sIINk+DXKgRg5qVzzrMSoiXKq6HfU06F1Jj g/davrhyBwWuYnf/ZGPm3Fyhz/9ZfIhgLC24y0xMGeP1eYf0z1I32OCJ54nfTNd3Sszl ExBLW/yBK26zIB7N1UTLYu9TJDBpt41wk6mvq3U7X6a71PN/6z/9A/6mW+BQMDV+jVgr 49QGmZpHE2l2U8D8cPN4whuo+UyckTFNWaeVZ7m13gtThSrexkeWcPllHHAAXNIHKGeB k0pY5I7aSsZANle7xQ76IoiQYSxTq76oV+mPHcMLNJSgwwPAncu3sZ3Z1uiXKJQTsURf /ODQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=UvwuCb0YiS5vOqBklR/moOX0WrYMs/CslXhc2FQUqcs=; fh=CMILZ+goaghq6B4UpCDhf0EQp6kYD0LAlmOkUiVCOvs=; b=nVzkEttxqBr9HJOtybrt5TbtsDOtZrFNnOnf3+dfd0OGxO/ZwIEZY7gmBUqMZlNdfi STD/KfcHHYBAoIWQO9HVYCDEjlyxiNGo6YOvZz+jLPzgBHzmBJGPnVAWTDJdV7yJ7DWf ZoAzUWF7ixZ0u5qtPn9YQG4pPlsA7GnGm7rZZk0vkvZO82RYzIoMrQEsI2BAVk1eBE3i X+gXI7ug+/Nw+ziIenImHI4TYoZWfim7BkHaprlKY80dAWdZWHXRe18T5K0zHNUCQmpS Psarvr4kwsw1rGSXTDY90VQd7BrzO+bLRwu1NJAW2vGRePrylCdDLpstBCABa7GuS0/3 smMQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=BVXUcGr3; spf=pass (google.com: domain of alexander.ivanov@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=alexander.ivanov@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-48e3ed1931esi30812227f8f.383.2026.10.29.07.44.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2026 07:44:01 -0700 (PDT) Received-SPF: pass (google.com: domain of alexander.ivanov@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=BVXUcGr3; spf=pass (google.com: domain of alexander.ivanov@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=alexander.ivanov@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=UvwuCb0YiS5vOqBklR/moOX0WrYMs/CslXhc2FQUqcs=; b=BVXUcGr3kU2B LrRjA6XrfatQrIJDXrp8rn5+gndHbH/B3/ISdFdRsCmYKVgs1z72cNav/W/mO/MU8SWerJ95v3vkL 71QHRirObKPqYp2Qh3zyO96aoxvdsZlwKHE817GHDpBUS5ZpuIChthtJm/rqoUTvEb3p+jujk+Ybn 9SiPLqYQ8L6eeQGAIftmxbFMazcQ1cdIHVQxnU+X1F/Ds25VjAWd8Zep+iZjy9oS0m8Xvb8ybcC69 UPosm1f68eG8u2toVwMXXUtdaQIK83EcRuoVmMJpkwICFNa0KxJ4L/sy19JWhZp9S0meFFB6mKbgs /UWTF+5u8u+urwwBV52anA==; Received: from ch-vpn.virtuozzo.com ([130.117.225.6] helo=sky) by relay.virtuozzo.com with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1xMRIT-007b5D-1J; Thu, 29 Oct 2026 15:43:58 +0100 From: Alexander Ivanov To: andrey.zhadchenko@virtuozzo.com Date: Thu, 29 Oct 2026 15:43:58 +0100 Message-ID: <20261029144358.3384569-4-alexander.ivanov@virtuozzo.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261029144358.3384569-1-alexander.ivanov@virtuozzo.com> References: <20261029144358.3384569-1-alexander.ivanov@virtuozzo.com> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 v2 3/3] drivers/md/dm-qcow2: do not revalidate inconsistent persistent bitmaps X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org qcow2_check_convert_hdr() ignores the autoclear features stored in the image, and qcow2_parse_bitmap_ext() sets the bitmaps bit whenever no bitmap has the auto flag. If the bit was already clear on disk, a writable open sets it again and marks the bitmaps extension consistent. The qcow2 spec requires to treat such an extension as inconsistent, since a program without bitmap support might have modified the image. Keep the bitmaps bit only if it is set in the image. https://virtuozzo.atlassian.net/browse/VSTOR-138887 Feature: dm-qcow2: block device over QCOW2 files driver Fixes: f913aa3f7a1d4 ("dm-qcow2: parse bitmap extension") Signed-off-by: Alexander Ivanov --- drivers/md/dm-qcow2-target.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/md/dm-qcow2-target.c b/drivers/md/dm-qcow2-target.c index 2d1e5d4e1b3a..4a0e5747b77a 100644 --- a/drivers/md/dm-qcow2-target.c +++ b/drivers/md/dm-qcow2-target.c @@ -835,6 +835,7 @@ static int qcow2_parse_header(struct dm_target *ti, struct qcow2 *qcow2, struct file *file = qcow2->file; loff_t ext_start, ext_end; struct md_page *md; + u64 raw_autoclear; int ret; qcow2->file_size = i_size_read(file_inode(file)); @@ -865,6 +866,7 @@ static int qcow2_parse_header(struct dm_target *ti, struct qcow2 *qcow2, max_len = upper->hdr.size; } ret = qcow2_check_convert_hdr(ti, raw_hdr, hdr, min_len, max_len); + raw_autoclear = be64_to_cpu(raw_hdr->autoclear_features); kunmap(md->page); if (ret < 0) goto out; @@ -914,6 +916,8 @@ static int qcow2_parse_header(struct dm_target *ti, struct qcow2 *qcow2, goto out; } } + if (!(raw_autoclear & QCOW2_AUTOCLEAR_BITMAPS)) + hdr->autoclear_features &= ~QCOW2_AUTOCLEAR_BITMAPS; ret = 0; out: return ret; -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel