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 14B5380067 for ; Thu, 19 Nov 2026 12:52:48 +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 6AJCpWg4031120; Thu, 19 Nov 2026 15:51:33 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AJCpWg4031120 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1795092695; bh=ExTB2+GMnKKkkjWDMQ84ULEmeTeNUkl2lv7VzX6DsoQ=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=c79p6v4iKR6W6cHCr36y2XXCfBxGNK/04rhTUvlueoCeaDLISslGVhxbZcH2ExxjG tAgVhZXczCIYWD6QNoK5ZYjxtg6gwOeIbmdLhGU1HWrsV97k6A8npppreZfhFVLI6N s9+sn2SJbKk9XjVba38mZPU+2oNyHDcJfgQSdk0fAYz/AbJcx3NqABlVe/1d53X6wR hf5iuz3PGXo3LS+2I9zONd0ubAqCif73xSpKS2JrAljCUs3HGGixJv8XBOUsENKhcX xJyF67utw/lc5Ckj9y5Uf9F6Yjoq3BeEJc+9HRoT10Pv26klozLHWvYwNOhOXmPvHb zKnRh3dWsbZaA== 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 6AJCpQgY031089 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Thu, 19 Nov 2026 15:51:26 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AJCpQgY031089 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="qqsBxP/C" Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-49034831bb3so1511156f8f.1 for ; Thu, 19 Nov 2026 04:51:26 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErEwKTExIux/mn7VVzmdihoP0qpnPw3npNu2yVTQ4/Ss3V4158yAJw+G8UNXu6k+ICxA2PgFOQ==@openvz.org X-Gm-Message-State: APuU4Z8bideqyc+XO6Hf1LRsXI8MopKeX1UoC2Yl7W7PcE7xinJFGuqm vC1gEYkEh6Ak33/kA+iEcx8OCzHiqrmNVHo9qmizKzx/1f0V8nbAxpATOKaY2fg2i++ZCMMDERx Abi6Kx6oUi72H22Mr5qs0KdcutgSoLoma9coxMk3XKuXNe2rfH7bxkg== X-Gm-Gg: AZFdTZddN3MI5MpCJzYSzlHwf6uHg4tSG/6ozuUliEuXi8jDCtZYm8BhBJDLCLCDdus GdJmEnI7KGcGB3YH/T8p2KQzZTdl3WqrDSuCFPiSXD6q2L7DN4leYYAhTLDQm6QKg4/0AnX7eyK LOIMy4zQ61+AzRk8B2NFJlz1XkQM8YBwsoT4m2WUkOsEM6bDVmMosev5ykW0Jya755yEs4G99SJ GwkD2CCLWOO29gJFM6daphsenvo4Jq35ZVWz095oCDZRLUF2f8CiulaDT4SZxTW6fRBIk6GfCIF jhkq9wX0Mw== X-Received: by 2002:a05:6000:2386:b0:48e:5db7:fd6c with SMTP id ffacd0b85a97d-4a6346da7ccmr12780443f8f.4.1795092686417; Thu, 19 Nov 2026 04:51:26 -0800 (PST) X-Received: by 2002:a05:6000:2386:b0:48e:5db7:fd6c with SMTP id ffacd0b85a97d-4a6346da7ccmr12780393f8f.4.1795092685894; Thu, 19 Nov 2026 04:51:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795092685; cv=none; d=google.com; s=arc-20260327; b=akzSyGbQbOBZAx3Y+GYInlizkxcDwbIAvVtKATfMdf+xtmK4D//1dYkgGZM/k76Y4Q PB4yazIub8kExismm1784hUuRCJd7TpuGBA3mBpZZkcYLJ/dJ/A+Kx/Z11oqGL0RLitr LbdBqmoCwzPuS24wpDtwf09A8fQ4NSnPHmfDiw2Ov3G/tA4yaWh+67pMcdUY1Gx2KBpW sBlaKBNraOEA4vzzFbx4kkQw4+yD/yMeFhQ8JdYlyUKtBNWD9YHfJMzfIjccIMqe6/d1 DE1Fxpm2VooRfzvnJSWMqnBpNt0SXOgpLyN0VdcqGuzk7owTOTCiWOJLJF/ckeSdfDii qNLQ== 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=XMWRWZb6vJ9pv3lqfwRXfkAYPMAtLhJI8XgaCRYbHLo=; fh=BsEWKTNFU+fWhdWM7va8o/J1c4jCPcauoC2dolZhick=; b=rqsJXi8ZROl9lgyui5PMwggkHLEb42yvycIKaZL1AlsBKoq37A+SbGDssKikxXq2QP InSiqSUQ0RBlShHLO/p9A/CsOcK6x0fu/F0xQOba8z4tw1ocQlFwIwJozIQC7Lr+WzMW aufZxgXeDt+Y7QUEXItN9r8vV+7ZThFn7zP763LN8iYv1e58NQjEnlREJuc69ZCvhpnV 8+/CVT9hgAFiVpeIGGvJGzZdGkgRR09ywZvRRP+xEPFVTK1PcfB5rRCUU0p/9+tfVNKu Aq2aBctZHLdewOr1rYEcFWG9/PjieHbbLivMDtSM91fb9nnIKqFAtuXDk/q6Z1ZovIGj Bpfg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b="qqsBxP/C"; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:989f:a206:d03d:c3d5 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-4a67a1547ebsor1032076f8f.17.2026.11.19.04.51.25 for (Google Transport Security); Thu, 19 Nov 2026 04:51:25 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:989f:a206:d03d:c3d5 as permitted sender) client-ip=2a06:5b06:b600:300:989f:a206:d03d:c3d5; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b="qqsBxP/C"; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:989f:a206:d03d:c3d5 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=1795092685; x=1795697485; 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=XMWRWZb6vJ9pv3lqfwRXfkAYPMAtLhJI8XgaCRYbHLo=; b=qqsBxP/ClFIkVEkmd5gVekNqlsGRrgUR7xM5vr0l6P6QrZ5dGBzmfvr0LAcpakAyv6 Qop6ydUuCYNQbwC8vyJMxVks8EKOU3syjeNss9k8Fepe5hcIPs6T98BDz6wkCutkfBmV YUFokRrb+EowQ34LW3vgV6pB2NaR+piJNPp328xt43fz73sq/U/XENx3OaX07U1DfsG/ KwIAIGgeSNhB8pp+2QMWK4O5wYnFmX/Fqu4n/qG4MdTgWPa7FZ7bAsi15GuhdL3OLxzv OA+dPm78PBbMzZs/KMRKC/SkD1elE5SAlIAiTCRPstb0bacfZzsqwibcuWfG+1abUFoF 17KA== X-Forwarded-Encrypted: i=1; AL+hErFSD6NG5bIL9WR+HZbxWX8ZAM3cB/WUQlPaSzYKumLHlu7U6CA2A3zLyI3Qtz73LXgmF2WlKw==@openvz.org X-Received: by 2002:a05:600c:a55:b0:4b7:6a8b:9df2 with SMTP id 5b1f17b1804b1-4bb7da2bbdbmr105172955e9.25.1795092685332; Thu, 19 Nov 2026 04:51:25 -0800 (PST) Received: from artemis.sw.ru ([2a06:5b06:b600:300:989f:a206:d03d:c3d5]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb84e804d2sm30591395e9.5.2026.11.19.04.51.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 04:51:25 -0800 (PST) From: "Denis V. Lunev" To: alexander.ivanov@virtuozzo.com, vasileios.almpanis@virtuozzo.com Date: Thu, 19 Nov 2026 13:51:20 +0100 Message-ID: <20261119125121.861804-2-den@openvz.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261119125121.861804-1-den@openvz.org> References: <20261119125121.861804-1-den@openvz.org> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.2 v2 1/2] dm-qcow2: zero qio pages with memzero_page() instead of kmap() 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 zero_fill_iter_bvec() maps each page with kmap(), which may sleep, but parse_l2() calls it through perform_zero_read() with md_pages_lock held: a read of a cluster whose L2 entry is dirty or under writeback reads as zeroes. A debug kernel then prints "BUG: sleeping function called from invalid context" from the dm-qcow2 worker. The loop also walks multi-page bvecs and clears across page boundaries through the mapping of the first page, which works only without highmem. Walk single-page segments and clear each with memzero_page(). https://virtuozzo.atlassian.net/browse/VSTOR-155987 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 | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c index 32373114580e..c7e186fa6115 100644 --- a/drivers/md/dm-qcow2-map.c +++ b/drivers/md/dm-qcow2-map.c @@ -283,9 +283,7 @@ static void zero_fill_iter_bvec(struct bvec_iter *bi_iter, struct bio_vec *bi_io struct bio_vec bv; u32 bytes; - qcow2_for_each_bvec(iter, bv, *bi_iter, bi_io_vec) { - void *data; - + for_each_bvec(bv, bi_io_vec, iter, *bi_iter) { if (!count) break; if (from >= bv.bv_len) { @@ -297,10 +295,7 @@ static void zero_fill_iter_bvec(struct bvec_iter *bi_iter, struct bio_vec *bi_io if (bytes > count) bytes = count; - data = kmap(bv.bv_page); - memset(data + bv.bv_offset + from, 0, bytes); - flush_dcache_page(bv.bv_page); - kunmap(bv.bv_page); + memzero_page(bv.bv_page, bv.bv_offset + from, bytes); from = 0; count -= bytes; } -- 2.55.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel