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 762CC8045D for ; Tue, 27 Oct 2026 17:50:42 +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 69RHnRIN031963; Tue, 27 Oct 2026 20:49:28 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69RHnRIN031963 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1793123369; bh=Uj9dYCp9REK+lykHeY74iKmjLGmcd7FidXvrN3j0pHc=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe; b=kNkJLMVPapYY7BqpZEEowp8eJU417AOeNhaJ+/aH+NiugiI4BWcRv/F0GeY8o9gqL 4nKMLs6WTX7aggHLj4dkWrXLAlywLX93iF6C1A3MG+0BpacNo3e4vh2yq9cpPsJEHi GaBn148U3mPeQWmIbblgUmiUW0IZto623Ar1Wuq7APRWjShDimapSGW64jMjiy2bcf LZW+qG9HTzCngF3eyi51pl3rVDdZW0mWf/+y+ydo+cQBuu1MQdZGoxBzQcNt4HYQ8q UiR4+CuobBpTInDzjU4p9bNrX0CGnSFnetP0fpdm8INCcjG0cd6noDodWmNR8NPjCt bkX3a7SpxwXhw== Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69RHnR82031959 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 27 Oct 2026 20:49:27 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69RHnR82031959 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="mUbvM0L2" Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4a20fd059ddso733365e9.0 for ; Tue, 27 Oct 2026 10:49:27 -0700 (PDT) X-Gm-Message-State: AFq9FYKGzEguijiOzxOT4v4ph0s43ZzZkPaGBMfqLD4v9cyrSL8LcJTU 6fk/2Si6lRzXf5r68pVi0OpdK6ZUC4bm8hA5rQyOLJYASbyau4vIP2sLAL4X7USgyEU803z8dV3 UwgCV6mxM3nASJC7T2Z8qD3y1ixSNLpUlFFCIUpsHci6erseSWdbFJw== X-Gm-Gg: AYBFou36cbCczFAFOyiQmUgG5Vju4j6TUwSsxdhWTMGFrj0cFn7gLfdPGU97BA1TnQx AgZozijQtWpHH2HqIrQoNn1LcdJZNw4TfN6qb94NdYFd0lcSwm5we7BB8Eche44ywSBdmGER5pB EyZQUKqtsBMeW2BmukXura0jHbZnrV8k+LMv0iNrAV+Y3RaTz92R1wZmIQAPet1UjT+HEz7JF3X vui8MJHozVTrVdtetUHrvCTUvdpUoJhqKVXn7FWplEaMrmiTwrD3pGVvgGnw9kDfes2wk3Vx2/e vGZAmDCNzw== X-Received: by 2002:a05:600c:5253:b0:4a2:1a:a120 with SMTP id 5b1f17b1804b1-4a35ac99828mr199407335e9.6.1793123366804; Tue, 27 Oct 2026 10:49:26 -0700 (PDT) X-Received: by 2002:a05:600c:5253:b0:4a2:1a:a120 with SMTP id 5b1f17b1804b1-4a35ac99828mr199406695e9.6.1793123366298; Tue, 27 Oct 2026 10:49:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1793123366; cv=none; d=google.com; s=arc-20260327; b=FrEzL6C+IYYT3d4pLBQq3+kiIbnC7RCbnOH/9u6qCVsmJwNSemp7EUJ20vJ9Nc3J+6 0rQWqV75JerfRWO2XZmQ7OTYuB1Ub7Palthsi/g1DxG/kjnOUy+9WtHeUazLPV2wneI1 l0Fg7uwcUY708zpjCQGlRPk5CIKjkrzqNA49RcHL9YKMV6W+ucy+kJGclciSlFGX0TBd FLZ8QSkwLyqjuW6ugtVF0vIm4wLATBCv+0Bex3cUZnLsOwssjIyM1sdpR0UpkFAMLReB EOSRFcoirAN7h4KmsYVv2T0g5fud0FRi6XJ20Qn0klMZERPSwAlpFkWIUi4Uxp/XR4/s +OLA== 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=/PIUWYGPozgOCSwrt+qAurELQFPkiYj2rNr8n9nMtS4=; fh=Kr/R+ZQiC/tid3qUs5C3px+AHPSuipOrrdrDcZfSlMY=; b=cT/pwfqJExMiwsoFhWD3BCaykkJ7i0tYBoXU+MyHvIKAkvlYj3ks9ETfJL8KT8fCg8 Jo3FKtkaSHQ5hved/h3Dm/N29fSvETRFkzV9bDY4WszmpftyNWDwZHB4EDkrnfMrd+6q CB5Y8gua7owff59snU362pH9QouPY5suNFzNJw8UAcjK2FW6wI7u+6Vw8MG+eeLDByic Hqdw4Ol2IQ3Wkw3jz8G/b5YlIrOEL6BizG37rdnN1v9bh/bweDU68FBwjfmdG2Ixqm6w BE+d0Y/TsAuRBwfrBdCt7ax2yAu7rJ6e2o+PRJXN2B1ZlV6Air9iCrVgdtkuYxsgnaTD tx7g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=mUbvM0L2; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:a5e9:5d2:969c:16de 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 5b1f17b1804b1-4a800c4d5cbsor7184505e9.5.2026.10.27.10.49.26 for (Google Transport Security); Tue, 27 Oct 2026 10:49:26 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:a5e9:5d2:969c:16de as permitted sender) client-ip=2a06:5b06:b600:300:a5e9:5d2:969c:16de; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=mUbvM0L2; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:a5e9:5d2:969c:16de 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=1793123366; x=1793728166; 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=/PIUWYGPozgOCSwrt+qAurELQFPkiYj2rNr8n9nMtS4=; b=mUbvM0L2aIyG3L5xIO9DnDbgiTYPTS6bpUe/GkbFIXnHndBGA1YND8XIrOce1RI+K9 3s5/IbQzJeOZodSyIEHlNXX7gm9hga52tDJyNsGKn9pEq7FNEajIph4bVTgiXtsLrUuy N8NmDCmWGPxtwtRX0u9OWWzsmFFOsGcPyCaUU9h7hq76IYbUEoTFXT2ygD5mTTvC5547 ijBQhDwxPx1WFGNxNihEnDChB2H6nnm6wndW5fd9cAcR0EMlaVcBYricVxscRKuB7XUH XXgSoYqmkH4S+lZO8HusgdFddCKI3NS2XxWwrJ/YLg+migV1guxHJsBg9yiy3Liq9IKl Ge0Q== X-Received: by 2002:a05:600c:a04:b0:49f:fe39:5bc8 with SMTP id 5b1f17b1804b1-4a7555d89c5mr99274985e9.12.1793123365679; Tue, 27 Oct 2026 10:49:25 -0700 (PDT) Received: from athena.sw.ru ([2a06:5b06:b600:300:a5e9:5d2:969c:16de]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a92fce709fsm5939195e9.5.2026.10.27.10.49.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2026 10:49:25 -0700 (PDT) From: "Denis V. Lunev" To: andrey.zhadchenko@virtuozzo.com Date: Tue, 27 Oct 2026 18:49:20 +0100 Message-ID: <20261027174922.2254893-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 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. 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