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 011C580027 for ; Thu, 19 Nov 2026 01:11:21 +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 6AJ195WH031311; Thu, 19 Nov 2026 04:09:06 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AJ195WH031311 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1795050549; bh=s8JwYtWSVlwUu5x+wsEFRcSIVIYL3nYx7dr0W7UwJQQ=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=wGWPv62rs8bV+LQKiBOOmqIyy3vzZwk1xhTOcY7ngF1VQS6lTGIRUF7P11+rKjo8M w5V5IYH2OYdI8GLfVERFE0cQoMH5smhoDWTvz9oi7U1DdD+8oEiyPsGOlZ8KTri/rf MXeb6Pi5iozE04KByhG1o4wj92SOh+rE7qhA8QY5XkWcl/lrSHiE5XPe0Fe5uZqPZ9 wY4bedKe3kvd00d4ADnPyaBrDjHN1rSSlzSB/ms8kH46V7YU7qM/QLQ/QCcP5qmeYf TZqs3pS/c8gj4+YZeY8FpAEk6RQmDw1u/nC8Xd33aT69kfPYE26UGbEYS+BF07uK4Y ta4fjdxCE8VUg== 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 6AJ190dQ031286 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Thu, 19 Nov 2026 04:09:00 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AJ190dQ031286 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="CnD3WQ3o" Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-4a68703d177so673835f8f.2 for ; Wed, 18 Nov 2026 17:09:00 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErFE2UF3n+eymqHObyMYfU6/TN+4YJcSSJamvU++430qeytL8gMJenvUd/VZ/2cj1nHkRc+y6A==@openvz.org X-Gm-Message-State: APuU4Z+QSMdOg4xF1kPGSeZlwMY1OBi0qtpW78pnbyj8NDXWwqVLKM8K YnyLR3MA7M4WnaD05VWSPU5x57nrHgOCswWJ28jdqgSoBiRw+CEuiDyoh+azdkcJrab3qpFwxyk rS/Brc/9ImGLY3kQocE3YFI6vayg5KDWZHeAqUbv2L+16d25tU/YDnw== X-Gm-Gg: AZFdTZcP3w7Te1h6JgLVpjg4gknnbnMJ3dq+brWLSr8C+niC8tinSYPdPO9U+H/tp0f x1dJR2C++Tu61+/vHHxv++7KYNOGt0JF2YA0GMteZQ4qw7ol+TI2dUI8OefCITTSCJrK4o6AXI5 Zwa/1Msb3LhmkX0+3v6ZN+cm0xxN5pC8J0fKiEuySYg1GHX/cxvF51mgZ3ivppEOb3/fcbIzIRd UXp3dGotyRQxQ/NUvpsyeuYyvilBoV4hpkcPuQpKPcUkQ4sAyatxY8nc6RegCd7kk9oUrBvwAPU asE1QL6GJg== X-Received: by 2002:a05:6000:4023:b0:4a5:af7a:b7ad with SMTP id ffacd0b85a97d-4a62e43a3fbmr10206955f8f.0.1795050540340; Wed, 18 Nov 2026 17:09:00 -0800 (PST) X-Received: by 2002:a05:6000:4023:b0:4a5:af7a:b7ad with SMTP id ffacd0b85a97d-4a62e43a3fbmr10206930f8f.0.1795050539901; Wed, 18 Nov 2026 17:08:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795050539; cv=none; d=google.com; s=arc-20260327; b=JSyHBJhZNl4HWfNKNG+uKn9YT61VSjJm17dbT9WqLnnnFUH14S4ZhkoaWT7U7K8R68 r4Gv4hMIPFB5Pyv+JAHxZ9q7h5hLB8jIO5Qqn6dKIWqePs+fui6UA4pncJ/UHKHb7IHZ hhfWtNBG3EL7JnFGH+dt22KtdEWvPN0Vt/fbiesyuh9YEP7ewWb+vHVyMt1SMwGNhuYd 2NqNMMfxBCLfky3JUYiLIGdT533mBy/kYA0KodhGmgW8UZZU58xV/ER1jDyywcGQ0kU7 L1VUMVJS4sfaPwMu8AxqlfXbg2baEeBgTrActbe2AMTJNhWiO0ec5MRMVs1IAC+nRVmc WVeQ== 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=bp648Vs8PH0lXcXrvDMCfCYOtWOg5MRzbivHrHcCFh0=; fh=VinyRXwh2Z5kIaOArgm2AUlvC3foV4BPVw/6Map6ooc=; b=ZIK7w0Oa2vFPDXRs4BCZuN7akGOfdx6c8RHFZFC9sjjuLXCD3C+ftwGB9SgwizsBPZ kg6gW47wJjB0pVk/cDOldr7dlYqFtfG29uCgw0Jm10yZRcIInkdhF45IwsLIRbi63YMO 2Z0uRsp63w9GfC9rxLpqAWbweA6UYgAhFwJRlFW7wbzZVjfzlMQbbXXM0cAohWKG3a2g VYlXzjpXmYP60Ngmxd4Lev+LRqpqyZWit5j4jNFYHFcQTxTncgUCT10QB4vHrIuSLPfH q8R55EtEJ1CQmvcQCxdpgb/hXunpy7HDJEJbOKxGM5viMdYfeOHrCqEL1BqKgF5nZPYQ Lx0w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=CnD3WQ3o; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:8c09:3cc3:6efa:ac1f as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-4a8b079cef3sor180099f8f.11.2026.11.18.17.08.59 for (Google Transport Security); Wed, 18 Nov 2026 17:08:59 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:8c09:3cc3:6efa:ac1f as permitted sender) client-ip=2a06:5b06:b600:300:8c09:3cc3:6efa:ac1f; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=CnD3WQ3o; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:8c09:3cc3:6efa:ac1f as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=google; t=1795050539; x=1795655339; darn=openvz.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=bp648Vs8PH0lXcXrvDMCfCYOtWOg5MRzbivHrHcCFh0=; b=CnD3WQ3oUIVx6V0UJ5+WdxWot6SN//KD94x00MXmcRr9t1G4Apk7a3a2OdtE2n1rwN 3LGzaHjesavkZ8wGOF0RWQ9els4BtpXP1ObYHzcokaxflt0M0R34PcEF+M01cXERFFLk VrNeBBecUbdpGP0fGVT/sDtwv3C5LNNcV0WBuENJWKgdgbXhpSPN89zE3e88ZchtsSJZ IN7SrSzOwVurDqq5Cxf8cqkQZ3cNByNyN1MmAY8FeeGLDdgjRPnSSDKrQ35BC+6fDiCf ErC0eaqpPJJQ0q0CxXDjZw0JPjhmcMEDgK1oLJnOGqjJ3gpK+4HCdDUYKrr6jPiiK1ma yk/w== X-Forwarded-Encrypted: i=1; AL+hErHoHCXsbXI71t44nKYvahUuzcy3NoagJYqtdnP/gRvWnqA8UtawgmpzoChuBT9WimBd0pICrA==@openvz.org X-Received: by 2002:a05:600d:600b:b0:4a2:cbe:bec2 with SMTP id 5b1f17b1804b1-4bb7da3a374mr82474675e9.32.1795050539452; Wed, 18 Nov 2026 17:08:59 -0800 (PST) Received: from artemis.sw.ru ([2a06:5b06:b600:300:8c09:3cc3:6efa:ac1f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4a65560b2a1sm7266442f8f.32.2026.11.18.17.08.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Nov 2026 17:08:58 -0800 (PST) From: "Denis V. Lunev" To: alexander.ivanov@virtuozzo.com, vasileios.almpanis@virtuozzo.com Date: Thu, 19 Nov 2026 02:08:51 +0100 Message-ID: <20261119010854.4107497-2-den@openvz.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261119010854.4107497-1-den@openvz.org> References: <20261119010854.4107497-1-den@openvz.org> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.2 1/4] dm-qcow2: keep the zero flag of an L2 entry when its writeback fails 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 From: Denis V. Lunev On an image without extended L2 entries, a write to a cluster whose L2 entry has only L2_READS_ALL_ZEROES set allocates a data cluster without asking for pe_page: prepare_l1l2_allocation() wants one only for a preallocated cluster. If the L2 writeback fails, the revert finds no saved value and writes 0 to the entry, so the cluster reads from the backing image again. A discard of a cluster that may be mapped in a lower delta leaves exactly such an entry, and after an L2 write error the guest reads stale backing data where it discarded the cluster. Ask for pe_page whenever the entry reads as zeroes. A preallocated entry is one of these. https://virtuozzo.atlassian.net/browse/VSTOR-154311 Fixes: 222b6f1291c1 ("dm-qcow2: Introduce driver to create block devices over QCOW2 files") Feature: dm-qcow2: block device over QCOW2 files driver Signed-off-by: Denis V. Lunev --- drivers/md/dm-qcow2-map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c index 32373114580e..ea4dbd949897 100644 --- a/drivers/md/dm-qcow2-map.c +++ b/drivers/md/dm-qcow2-map.c @@ -2763,7 +2763,7 @@ static int prepare_l1l2_allocation(struct qcow2 *qcow2, struct qio *qio, map->compressed || map->clu_is_cow); /* Allocate cluster for DATA, and prepare L2 update */ arg_mask = LU_SET_ONE_MASK; - if (map->prealloced || qcow2->ext_l2) + if (map->all_zeroes || qcow2->ext_l2) arg_mask |= LU_WANTS_PE_PAGE; if (!map->prealloced) arg_mask |= LU_WANTS_ALLOC; -- 2.55.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel