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 319E580474 for ; Wed, 28 Oct 2026 13:22:30 +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 69SDLA3d020282; Wed, 28 Oct 2026 16:21:11 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69SDLA3d020282 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1793193673; bh=C6W84TtfqAiMa0GRVFbHzNPLpaov9kAcLmnTP1Txd+8=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe; b=jBs3Vv3Md48BNfTfM9Nv2TwXvc0HSWuEGLuFNq4nioZw1+MlJKFIK+3BMM+hpEb5a eqZCOybTO3puzABp+atctoSwjUAnCqlv7CLGcQ0gH8Euc3dV8s5wqRfJxF3LLshIyY 5rMVYrGBPTcfq26/ZTl6Qpa6VkCJmEqGF5f3YVih5oo5OZX1t7yOAbd2pmSni/Kh/L YAtfXPCVRoNBuNrs1Np0zfTZeO9C5ilJ6Ax5zSdKwAiQGrSDUPniPahPBNg9EWha73 Jgav1T3LCXtPLsBybnZlUw7OZWFHN/AwpwuSi83LGw/fpV+0PuRxtMHOGPh+Elc75d Td9rMAUb1d0AA== Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69SDL84P020274 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 28 Oct 2026 16:21:08 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69SDL84P020274 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="L1z2l+pE" Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4a17741243eso7125415e9.0 for ; Wed, 28 Oct 2026 06:21:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvByiBz/m71wIi4Axr6l2Fg4Wf6XN4QJjZkUc1Yl48PBrk7wfUxW5ac591pvLl4ydSrq5tgXUAA==@openvz.org X-Gm-Message-State: AFq9FYLVwg1eO8KXUv5/8ODPXfennjium8/sodBxkqX5d6qKyLuKsuEk VYSKRC9QfEQ1iwQvFnK3p1BvwmHQxRIRQENC4WJ8aU21qUwK5tdbCLTj38BWEp7FgZUk7Md83ap F71QetXhy0Ag6NI6Ubx1rOsLlcWm+UfeBXWtkTFV1mBAkxKrlMLccrg== X-Gm-Gg: AYBFou1EXAUbqJZxbcJ9wH0539RZWfr/bZHtfqn3nU2Fo4UjSYwW0h73ZH2Om5bI5iw idYaZsHrf45B7HJ7/klZTe1RJNESwnZehaYNo2kny5M+8kH+XZsiVnGNOKjiF0ghzLsJqKihE75 MhMIXidvC25N7NrfXzKHjvmx31oG1fZezY4tG8x4g/k+iYTeAQHzeoKKmVuiAXnt66z6stHSHSR A069LIbX3Nfq+pDwSZSe37NuGgy7IWLOnLgTdgOjZpjJI4Cis2Dink/EmWEhkavHAOlLPHJPoog IveFWwYMdg== X-Received: by 2002:a05:600c:3541:b0:4a5:a5ca:de1d with SMTP id 5b1f17b1804b1-4a9675dc907mr51991615e9.30.1793193668380; Wed, 28 Oct 2026 06:21:08 -0700 (PDT) X-Received: by 2002:a05:600c:3541:b0:4a5:a5ca:de1d with SMTP id 5b1f17b1804b1-4a9675dc907mr51990755e9.30.1793193667832; Wed, 28 Oct 2026 06:21:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1793193667; cv=none; d=google.com; s=arc-20260327; b=g/Z1rtgFtrqLzko2+lx5mcHzp4NhYYkZjay5LyemtbrqDF0Ja4MMpyqwK50boTnHs0 0F8gNxKoyBJU58Y1NtLnPiD+tmm/aIXjG9DZ5qmpLN3623bG4ATzjTO2SJCWiNJZIXvk t+K8cntBGYc7Ge8wuKmI6z+/AF+HWtpk1kbRCvtTeZ3m3NxycJEaVa+g6lrnrat2yp8X jE7jJdlp1S5xIAtW1IymVubVNJ4LjRgh8esybJFRIDKUYmlhOvMavVJs7gzGtu7DMhrn xwLhyBt+PZf2DKx7iv8gWo/JBr7hlns8/SUfB3hJOMLJxwuaegSuS/otufrjVUXjw+L9 ae5A== 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=jyGr3H8lUD+GWc64DeKJXVKkilwYzdK2yWDt6b6x+jI=; fh=wv7/UA3aGSUMzj4zhrK+03oeVCpoLG0M89FbU7tk7fA=; b=Ycvy+reQDdnMfjcu3JIgaJry5zJpeQsKD/f15PRrqYpkVfe04eOLT/ihDCQoPT4fys uCL/YbPvXZODMhlF05s8NWNCYcm9h5gTd5+L9Wnpx1JebASoAgivUj80drrS3AVvUNS6 xsjyif2nKnFrOcnAK1ACXfs7byG9fKju21Ocf1BVF21JlPsd/FD0oGr0v9dBGy5aXVCF UgS+LNLiBjBqh8bOIlEUZJI9D/i378qT82IXvu14zRey2Sr9qqbgaPkYmHLEbaDhz1IC LIVf8swtmykPfo71SnB6gACQel+Qe4H2LzbPIiTk+WltmHPtFRv+hNdGPVqfcVyC77pf NO1w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=L1z2l+pE; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:2c3:d099:6fb:56cf 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-48e3ebd7c10sor1919634f8f.8.2026.10.28.06.21.07 for (Google Transport Security); Wed, 28 Oct 2026 06:21:07 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:2c3:d099:6fb:56cf as permitted sender) client-ip=2a06:5b06:b600:300:2c3:d099:6fb:56cf; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=L1z2l+pE; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:2c3:d099:6fb:56cf 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=1793193667; x=1793798467; 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=jyGr3H8lUD+GWc64DeKJXVKkilwYzdK2yWDt6b6x+jI=; b=L1z2l+pEShLLNhW4aLg66c4xvswr3aWjA4CBY1z59W8oiLnv+K3Oz5UkKJBD9cor42 aQdaX5v6DjARSgRhcUYEQKm47AJrOHZP7RweyEWeE9KxTw82owY3DM5HOT97JriHI1if 6eaPDkKUDOpC5P5wA0Vh+jviGTAYjwqNaz7Aeib2rtXwpN7FS0QqS3ystm2PkK3Xwn/x Pag0QtlW6ztJ4VTkyWbmNxxHFcHcXDy1xh1y0QaGrF6shdF/AybNcVO46WmT0rfjuQT+ BB8VWqukKmbE/BQqIwtSVmLAkXWjh5/mOJWGtIJ903+kGHoBxRgZeQMSKou/h8oASSUf Nh4A== X-Forwarded-Encrypted: i=1; AKwUvBxFJ9Yb8TV0E82vzM3+KeoEFRXHsuE3QNZzxHrJ6DsoQr1NDcVorfA287yuWtXR5LTKWKpmIg==@openvz.org X-Received: by 2002:a05:600c:871b:b0:4a3:59ee:86b with SMTP id 5b1f17b1804b1-4a9643d5117mr51443905e9.4.1793193667327; Wed, 28 Oct 2026 06:21:07 -0700 (PDT) Received: from athena.sw.ru ([2a06:5b06:b600:300:2c3:d099:6fb:56cf]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3ecd3418sm25625739f8f.41.2026.10.28.06.21.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2026 06:21:06 -0700 (PDT) From: "Denis V. Lunev" To: andrey.zhadchenko@virtuozzo.com Date: Wed, 28 Oct 2026 14:21:02 +0100 Message-ID: <20261028132104.2885097-1-den@openvz.org> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 v2 0/2] dm-ploop, dm-qcow2: fix merge status shared by all devices 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 dm-ploop and dm-qcow2 collect the status of their merge service I/O in a function-local static, so every device on the host shares one copy. In dm-ploop it is never reset: after a single failed fake merge pio, every later online merge on any ploop device stops after its first pio and returns that old error until the module is reloaded, which on a working node means a reboot. dm-qcow2 resets it when each run starts, which makes it worse: a merge or L1 COW break starting on one device wipes the error another device has just recorded. That merge then reports success although a write failed, userspace completes it and drops the top image, and the data that never reached the lower image is gone. The status goes on the stack. The pios/qios carry a pointer to it, so both loops must not return while one is outstanding: every exit already waits for the counter to drain, and a BUG_ON after the wait stops the kernel rather than let a late pio/qio write into a dead stack frame if that ever changes. Tested on dev-cl04, 6.12.0-211.52.1.22.9.vz10 with the modules built out of tree, using test-only module knobs to fail one service pio/qio: - dm-ploop: after one injected failure, a merge on another device and a second merge on the same device both failed with EIO; with the fix both succeed; - dm-qcow2: a backward merge with an injected qio error, held for 5 s while a merge on a second device started, returned success; with the fix it fails with "Can't break L1 COW"; - the ploop pytest suite, ploop and qcow2 formats, passes. Changes v1 -> v2: - dropped BUG_ON Denis V. Lunev (2): dm-ploop: fix a failed merge failing every later merge on the host dm-qcow2: fix a merge reporting success after a failed write drivers/md/dm-ploop-cmd.c | 4 +++- drivers/md/dm-qcow2-cmd.c | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) base-commit: 02401c5e378f282fbf11bdc65996253ff65dad9b -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel