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 7539E8002A for ; Mon, 23 Nov 2026 15:39:26 +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 6ANFcArX021355; Mon, 23 Nov 2026 18:38:11 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6ANFcArX021355 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1795448292; bh=8fEz5Q8P7pgj9dviBGCy2oEdLIzjDZjcQNUmiH4r/Zw=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe; b=S9MzB8C78CResoeusoQ3g46LX2LkiVrBkl1mtRHEMNnKzUDvYieEJIQCTVXsg7/9l Nk5jbJ5DWXCQ0dq6mTrdjoMJZVTAQY1KEpz283vTWoQmFiN0ivqsP52KozW2NP3Siu aaIk98V7aIljQ1NwfsxKOs0yLioAmEO1S6wdOWsP5NieMXPpzVscItOSY2WUDES1EP yIs1W0hnKpuCM7zFP/7xtE7h6wVtvii6QzedbSNz4uin9fcexCiBpeawWtkSuPlWz6 I0jr+zCCh8lb+TMr4WftKq6ucspvgY39RmqvnVHbgE+C311L+VrM9nLOjj0jZT+IKO xXlItwS1BkqIQ== Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6ANFc8r4021350 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Mon, 23 Nov 2026 18:38:08 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6ANFc8r4021350 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="G+4W/daF" Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-4903fc8537aso2237158f8f.0 for ; Mon, 23 Nov 2026 07:38:08 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErEKrGb+LLW+a8a4y1kFTietVIXh0tv5Cg4cUyP3OF1ajGzf9ga1XUreWnVm7zS8/n7oWfR+1g==@openvz.org X-Gm-Message-State: APuU4Z/Jmg4MCRsRRQs8CpjS0eEeADSNpCuz2rV3g4jGK3+8ZoleUgz2 fnplYtATWkBm36JlNSmb3WZjXsLJT5qcklJaGr65lc3o/ZxNKioxX/uTy6Af0JLWkR0MYpD1KmY sTgfAZuvcuO4gLHJnXkzXEll4ZQwidP4fLudQ8eO9+QSpdR0H7LGr0A== X-Gm-Gg: AZFdTZeWasGQEgPhqbsemv656A5FOsKF+zvvw3F5bhyMzyWlLttIxSf6VaoeShPQXO5 5LTasMQ9dHtkG5hMHAnV6+oyK4b0YHuzYbFQFBzO+4Fpr+1vr1Dc94eupqVCqMKO0dSh1+3KmRq A3A46V6HefFaz//o2GoNBZFIbtWQ999vse5YwBIwFf1J2erlIEcZ3g2An1o5a0MO3YDzuQ9cmd0 aE+VtRynYw27gwk19NplgoOp9a+8SVBFemwUZrzyJ9XAf88sxG7F0/EIt06loMsz70lGZyLynwY tTVxKnY0AA== X-Received: by 2002:a5d:5f88:0:b0:4a9:b6e8:7c6 with SMTP id ffacd0b85a97d-4abab02c3bfmr23062288f8f.8.1795448288516; Mon, 23 Nov 2026 07:38:08 -0800 (PST) X-Received: by 2002:a5d:5f88:0:b0:4a9:b6e8:7c6 with SMTP id ffacd0b85a97d-4abab02c3bfmr23062247f8f.8.1795448288095; Mon, 23 Nov 2026 07:38:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795448288; cv=none; d=google.com; s=arc-20260327; b=l322l+pdt1LMdNCu/GnT5/5LwwlgKFraL8dQFPhw/Y3OqCKQOMhFJivYXbb0Tqh1jP gpH48SCsyzJsryXNXnl5MPGzWxq7blq0/82sOJ+T0QG9wNxU3AKVrtREPE9cFI94C7t3 CYH/OusBoCC7x5zt+SCCzI6AmuCbUBGNkK0hRI1m7RzkFX8Uqf5n8tLIboj/9OjCwAC3 BUYXsTi6eJuH4O+zet0nuXjrRcnHNH4w6syPwtkF3oOEn7BLtxRQwmdLdN7SfLKZg3Bq z6D9yG/b6mGQtARN/B+AsEf6JY1WgM7jjzG7WnTFC3qcTkXIkRsVfqCRz0Gpp+J67uEI Wt7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=4nj+tKrEVeJg/AccwBVEt0C4V9EFSrKLxHYJJttL4Qs=; fh=RvJUkynj7+5nKP88fS42iw0FYnQYOrCvx0cQ+8HpHnQ=; b=J3jYdLXLM20uAqNU9G/PUZeujhYCBXiJc4FziQyPWf0wbjE8mpoT1Fhn071u1m3a8V Pj2nG9DY9zMWFxozDDMs4EWsfbK1ww9Z6NQTAww0Cu662IHjBqE5juFMSOoJDFW/c6zh CPNSFjKcdP73n7KYJA0XmG8je8tIUUgU6NqUY5nTvF441qaquPdxXFGfJ1Ys++JMe/L9 QVmYC6Cny0YqbbdrknDFazeFx0POxJ3lPNBKN0kCptOgzh39A8UQoMXKQhTn32pE7fK+ 1J7OxB9RWjEyP1wi2cy3FBxKk4fDb4YlFhrWewgl/Jtq+LZg+KJ7HN5gc5FbU9x2WnPV a3oQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b="G+4W/daF"; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:62d2:2eda:8655:4219 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-4ab50faf842sor1906848f8f.0.2026.11.23.07.38.08 for (Google Transport Security); Mon, 23 Nov 2026 07:38:08 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:62d2:2eda:8655:4219 as permitted sender) client-ip=2a06:5b06:b600:300:62d2:2eda:8655:4219; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b="G+4W/daF"; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:62d2:2eda:8655:4219 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=1795448288; x=1796053088; darn=openvz.org; 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=4nj+tKrEVeJg/AccwBVEt0C4V9EFSrKLxHYJJttL4Qs=; b=G+4W/daF6UAwogSv3ERsowpt2hLlCKFg1W6PnVowxCdKG0yVjApUjCImeE3OspWzwz 066T69o31xJevojntPc/BjgSbZGULj5s7MHIppAsl/FB/Uefpr5FJr3iPMY0GAH1JI4B KRd7UFKZd0jH6MfgRAk7zxl58ctBuWImVOlXNQKR8juJ5QLV++r6Qql0FQqKeX4CR9V+ ZgT5jN/vtLhg1abAFOVQ28nMqENnhAYIxIqCi6wvBpHjyXM60O2IU5IuULtqT1uVOaZO fDEI1nJ5tqJqym0FmYHo8EM1I2Nt7yGmPB4an0HfhrPjiCRMrRLNnXCNeegW1WXcaXNA O0Fw== X-Forwarded-Encrypted: i=1; AL+hErERJvF3r6RYYpnslyk9gXc4dvnuRkBiriIMNMIiZzL1kNEJ0HrgbkGVHE/qab7W6+ydAUUMzQ==@openvz.org X-Received: by 2002:a05:600c:4504:b0:4a1:9078:911 with SMTP id 5b1f17b1804b1-4bb888284d7mr254073845e9.31.1795448287634; Mon, 23 Nov 2026 07:38:07 -0800 (PST) Received: from artemis.sw.ru ([2a06:5b06:b600:300:62d2:2eda:8655:4219]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab6bb989e3sm23034960f8f.52.2026.11.23.07.38.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Nov 2026 07:38:07 -0800 (PST) From: "Denis V. Lunev" To: andrey.zhadchenko@virtuozzo.com, alexander.ivanov@virtuozzo.com, vasileios.almpanis@virtuozzo.com Date: Mon, 23 Nov 2026 16:38:05 +0100 Message-ID: <20261123153805.128513-1-den@openvz.org> X-Mailer: git-send-email 2.55.0 MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.2] dm-qcow2: fix a SEEK_DATA/SEEK_HOLE oops on a cluster under allocation 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, parse_l2() serves a read of a cluster whose L2 entry is dirty or under writeback with zeroes through perform_zero_read(). A seek qio from qcow2_llseek_hole() is a read with no pages, so a SEEK_DATA or SEEK_HOLE on the device that meets a cluster being allocated dereferences its NULL bi_io_vec under md_pages_lock and oopses. Delay the seek qio until the L2 entry is written back, as the ext_l2 branch and parse_l1() already do; the seek loop waits for it and then sees the settled entry instead of one a failed writeback may still revert. https://virtuozzo.atlassian.net/browse/VSTOR-156079 Fixes: 412d5a4f7bf1 ("dm/dm-qcow2: add llseek_hole") Feature: dm-qcow2: block device over QCOW2 files driver Signed-off-by: Denis V. Lunev --- drivers/md/dm-qcow2-map.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c index 853e7a1230ee..06902a4830b7 100644 --- a/drivers/md/dm-qcow2-map.c +++ b/drivers/md/dm-qcow2-map.c @@ -1961,7 +1961,13 @@ static loff_t parse_l2(struct qcow2 *qcow2, struct qcow2_map *map, * in parallel with md writeback (accompanying qio). */ if (!write && dirty_or_writeback(qcow2, l2->md, l2->index_in_page)) { - perform_zero_read(*qio, (*qio)->bi_iter.bi_size); + if ((*qio)->queue_list_id == QLIST_SEEK) { + /* No pages to zero: wait for the entry to settle */ + list_add_tail(&(*qio)->link, &l2->md->wait_list); + *qio = NULL; + } else { + perform_zero_read(*qio, (*qio)->bi_iter.bi_size); + } goto out; } } else { -- 2.55.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel