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 6A43880069 for ; Wed, 18 Nov 2026 23:40:27 +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 6AINbFMD030455; Thu, 19 Nov 2026 02:37:15 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AINbFMD030455 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1795045036; bh=5HwW3710h5gXpCAOa1OLuw/WZDRTblBeJfYSRPWL7GM=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=UI8aMSVTrXlyuuMyfVTLayknTHGT+/4SqrffxqB0L6nwmXC4HpOGa7B+aZAI0Eqsg ReNpx3bs6hqtj9rAfl6WTZFouw4oEuXuOkXxOQzJDeJar3oS/B78up4KwZ8zLaMa7O RI70HSjqXpx0wDu6qc66qCgdcTJcCE67Gj+bAGJQtIW4Kb1MaP3QOHU9gDNX9UciFj NVyXkg8R0kYDrjASIvUjKkclRugTnJikGGrrDS3ks7/dH2UQ3iUA7MXsqbbjFQJ1NA OVN65lgiQQ6TrAc7vlq1msax+pDzDvEtZef/uUifC/OKpqNauOpYIU/02zKF3jaMOl CQLbjPvghN58g== Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AINbBQ7030440 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Thu, 19 Nov 2026 02:37:11 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AINbBQ7030440 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="ilojSqio" Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-4a3705ea6ccso423209f8f.2 for ; Wed, 18 Nov 2026 15:37:11 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErHbIQfkleLwQrJJNAUQdM2RM71GmotYdDb7bmQvgUKGOlUlq3h3UW4mGziM6REPvM3b4mnpZg==@openvz.org X-Gm-Message-State: APuU4Z/xe7l89cVQomt017ZWWHIBvhIrNKxktORhynlaY01c1aJLFsb+ PXy8Z2HUgwXHBPde/XTpgXlU5ejABT282VJRnwlFpZmZg/nagb3IiQwHOh9dOHZJZmNcEkP+ZMb JZnpfypA8D2qg2MLZAaAxAaPvEcGOalEJJmsZ+yx/oF/z0vbISyDQaA== X-Gm-Gg: AZFdTZftm1bw0FE8S04oOE9F+gwujv8NjsB+C60J8GxNbtm95oUDq/AeHudNzxIXr3G LqNylGQ/SLjsElmSZ3MSyGWcVqvyS1ipQN4L4lEksiegeyL1Sq0NOTUoAg66g8q85FBOayN380u 8pTfJQysTPe5rF57bpss9b/HWyevgymXdeCAtbj/dTfG6HP//4o9Zf9xvXJFmWXRMSDwwstrSdo VwpEGU/rB7S0kQp/ssyjNdCB0r/xqIBbS+PdYT/ORMeDf7t3/0SWwZRts0QKb6xqse2p9UbHn2y nAMVavjzpw== X-Received: by 2002:a05:6000:258a:b0:491:fd47:5df3 with SMTP id ffacd0b85a97d-4a6332bc8fcmr9309710f8f.7.1795045031103; Wed, 18 Nov 2026 15:37:11 -0800 (PST) X-Received: by 2002:a05:6000:258a:b0:491:fd47:5df3 with SMTP id ffacd0b85a97d-4a6332bc8fcmr9309686f8f.7.1795045030718; Wed, 18 Nov 2026 15:37:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795045030; cv=none; d=google.com; s=arc-20260327; b=eYMIWZr4XHe/ZRhy22LONaLzIauY1NSkUyxtd7dzcFcgPBDo8c1RbqoLdHsBtKd/M0 sVFXh6dn5cDJOyQ12+SFJxQg1KDcN0U1AYt7GCiZoTyGMUaeKxveoQLEV//X/m9GWUIe fub/qjY9iWbPVp6dmozlxzA/jT9D5qw3ameFoAgpJwvE5CRoEppQHq81BtSRUg1y/Lg3 PX9Pa9jl2hzW10E8HhQR8KsAFQxts2jFBqy0zN2ZCT9ja2yOiW+Mt1RqADbDYUaRBDL3 n/wDryLFAXtGjfxcT4WIaNHq/KKBWGZ1QCrQbnwa+CURiP8x/O59Dyq0IT5Nj8tVJcpM ABPw== 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=CNM4i8X/OvKswjQOY1EAgRu0YKaGiIK8Z7x2nSfxKaU=; fh=HOAT9G5TRSmQZV4RhwIdzNy49kQrsOhEkUQXMHrN8kc=; b=W2JCbSApAMSFiFHUxrn/aVa8u44KpSI48fHBfP6jgqMUyDqU70+8NElMs+2NMqHPhn gfTd/1qoZAp77v+/TBX22/bmBq6/T5Ly+DJWZ7sXZZQb/gTTf2ESfCpM0JVi9tk9yfrS x0a0mvDp2G6hZVmAQK2K3tDFBIIs7aqv5RNEmdLjIORBNdbYV8GceYV77gBOVSuHzeny 7XIQmPB9ADCwh3d00czMlmoMqCXnAT7p23/Mn61e6G448aern5cVv1A8WZ8dExUNeW9k 8T3UVooKOUyXai7l33pjm92Yd7u7W7OjmGcuwCYDuq4HZsdNjCkHJhP+JvXi6+XOiO7d 0Z9Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=ilojSqio; 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-4a65338cc81sor731494f8f.2.2026.11.18.15.37.10 for (Google Transport Security); Wed, 18 Nov 2026 15:37:10 -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=ilojSqio; 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=1795045030; x=1795649830; 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=CNM4i8X/OvKswjQOY1EAgRu0YKaGiIK8Z7x2nSfxKaU=; b=ilojSqioNqmDykEZ/Ve1EP7EmjS+QMh31lMeeLQQK1eaQN2KwDiHxXenzJlt45c27W 7S/LzDt4o4P6csO5acTbeeq/zfTe6O9Ev1Eb6C7sCgpHKGBvVkMqvlosT1VCL+GlW/8N VHB6P9aPWzDg+G9934Ek+V3ANIS0nIoVj5uI+tNY+n7PpyEm06K22ZH1xJBPAOUxoO/c pmOY8j4dSNKsfABIfUxJ5qIPaYLf6c7OpiDo7CMJbh2ftwJ8CxAHaQTmS+KstZ17QMLR Hcpv/kcGNSno/tDU1ugjKJCojdUKwbujAqiSTGR5WK5XvH+wFUtqytUpTM1tCtCa4auO f3nQ== X-Forwarded-Encrypted: i=1; AL+hErG5aO3wMrqZivJgvKLpq0hySPkd3YZrF8OL4EJzVhiIyKPcEv6DZNSGJ4+dSo3dvv+M2ovsag==@openvz.org X-Received: by 2002:a05:600c:6708:b0:4a1:f8cb:7d70 with SMTP id 5b1f17b1804b1-4bb7da37038mr80930295e9.24.1795045029991; Wed, 18 Nov 2026 15:37:09 -0800 (PST) Received: from artemis.sw.ru ([2a06:5b06:b600:300:8c09:3cc3:6efa:ac1f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb7e59834esm44871465e9.4.2026.11.18.15.37.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Nov 2026 15:37:08 -0800 (PST) From: "Denis V. Lunev" To: alexander.ivanov@virtuozzo.com, vasileios.almpanis@virtuozzo.com Date: Thu, 19 Nov 2026 00:37:05 +0100 Message-ID: <20261118233705.3974832-3-den@openvz.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261118233705.3974832-1-den@openvz.org> References: <20261118233705.3974832-1-den@openvz.org> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.2 2/2] dm-qcow2: arm enospc_timer under event_lock so suspend leaves none behind 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 qcow2_try_delay_enospc() queues the qio on enospc_qios under event_lock but arms enospc_timer and queues event_work only after the unlock. An endio that stalls in between lets qcow2_presuspend() set wants_suspend, take the qio and resubmit it, and the retry fail and complete the request. The endio then arms the timer on the suspended target with nothing left to retry. postsuspend waits for the endio through its inflight reference, but not for the timer, so the timer stays armed for ENOSPC_TIMEOUT_JI after the suspend. Arm the timer and queue the work before dropping event_lock. qcow2_set_wants_suspend() sets wants_suspend under the same lock, so either presuspend finds the qio with the timer already armed and runs it, or the endio sees the flag and its caller completes the request. The path runs only on ENOSPC. https://virtuozzo.atlassian.net/browse/VSTOR-155933 Feature: dm-qcow2: block device over QCOW2 files driver Signed-off-by: Denis V. Lunev --- drivers/md/dm-qcow2-map.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c index 32373114580e..ec07bcce6150 100644 --- a/drivers/md/dm-qcow2-map.c +++ b/drivers/md/dm-qcow2-map.c @@ -4584,11 +4584,10 @@ static bool qcow2_try_delay_enospc(struct qcow2_target *tgt, struct qcow2_rq *qr tgt->event_enospc = true; list_add_tail(&qio->link, &tgt->enospc_qios); unlock: - spin_unlock_irqrestore(&tgt->event_lock, flags); - if (delayed) mod_timer(&tgt->enospc_timer, jiffies + ENOSPC_TIMEOUT_JI); schedule_work(&tgt->event_work); + spin_unlock_irqrestore(&tgt->event_lock, flags); return delayed; } -- 2.55.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel