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 CAF4781377 for ; Mon, 9 Nov 2026 19:07:38 +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 6A9J6B7D002842; Mon, 9 Nov 2026 22:06:15 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6A9J6B7D002842 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1794251178; bh=iY7kztEEQxK/Sp+W+egVRDcXXMOWDluzsZxj1JD3jWg=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe; b=uJ5eFxr0C1+ZRHpUJeDG1QOEYdVyfOTHEgePfwC83Z+j4J9t9ZsWBKKONQqnTvBZr d2WVekmdGONNt23utQeoeBuvyslx7bvnsUmsPwbKOnlMOMSt3Ls4GuLOIgEhbAS3ss o5DrO8GRPX0WAAhOgGFclvOoj3EvcRzMxIBiWyhxZjodBoXWjSDYgiFREsOIvpjKgc toEisy81w+LvqTHG3IeV5nkXKhTqUX0CFYxBXEhFCgG6Rr2tERshVOVRwutoUyYJFn dB7zrdzFgQELcP4uk6TuG8xiflmiQPpKs9sTWdlhJtuZT1JlRxG6n9QmQF9qVCgbY0 4425yWuIiqiJg== Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6A9J69Ep002836 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Mon, 9 Nov 2026 22:06:09 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6A9J69Ep002836 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="ltllS6Eo" Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4ae2756fa7aso8433565e9.0 for ; Mon, 09 Nov 2026 11:06:09 -0800 (PST) X-Gm-Message-State: APuU4Z/L0gV8vFF2850GlUrSZQfPsVvHjrUUIh7EpaRo/ZyhABQP0oc8 QALurQMsoQdm71dUrgDNfD96LILl42UJ/q1KXcxLBemXy20lezak4RqijpfrjjfgdOmGkXSSaTp oBcoJ9swqysFVf+fRdZc+b2IvRn7vOPo99StPOkoilmoH+AwUl6jgzQ== X-Gm-Gg: AYBFou2CySID34qPrZrt8JGfbvGpTnd21xjX/Q8BHz61xhTPVtgmudQxXnJYHj7SdEo /OhDbwdB/5HQuOXQIP9KZlAZlx6k0MZcgiAzSMOOYnKhBO/CGBVEQCKl9UkLgVC+W9l+l0PCKvv Z6jCjqut08g7lYW7/zYBMD+VOAvladCdjBMTIHYSX9wI9n4Tjwp1hE9VOnvhByKGm3TdxUHjgLw HIZ2jb9X2HAWwfYw0O3CJbXLrNlW5rzYy1K8NKE0GzJolVqTCYbZqfpY+9oTt4ap0rvBWe9ObJ/ ooJ49uh9Kg== X-Received: by 2002:a05:600c:5247:b0:4b0:a307:46f8 with SMTP id 5b1f17b1804b1-4ba0233a475mr3055915e9.10.1794251169364; Mon, 09 Nov 2026 11:06:09 -0800 (PST) X-Received: by 2002:a05:600c:5247:b0:4b0:a307:46f8 with SMTP id 5b1f17b1804b1-4ba0233a475mr3055525e9.10.1794251168966; Mon, 09 Nov 2026 11:06:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794251168; cv=none; d=google.com; s=arc-20260327; b=d0LRqmxV6/TVIV6kc5neqVt+SZmGar7czkeFeTcdwfZCUuVOX6dhZ3By8DlDOXUJLJ Eaum/cVGcm7Lgf0SMx9vmfJpfGfFnWPbB5RmFFGsCeXkPvbz5wK8XiDE29hViMVUDFOW nIAaRv9tRi6PAFnDf7ah1JPKuIzjuiRgLx6+AmHokagjWRtfhdYm6Zwx29F+1ERUbbfS dCj5BxDcOu7tcMlzYSrPg7EsO2NR5mzF0QDHo0LUyJKOiR+9JUO8gBzL6sPMfAvPI7J+ iPNMzYLuukQ5Coi7W6lSNzwljWvH6chqePo3zpu5VQIqZrGUkqrSeIrAKc9VkR4Ue5xh 7t/w== 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=jpWbBVA7IBODq5+aBrosT7PkgACfwYIF502jnKlh22M=; fh=uKyv8CX20pIv0edA0snNI8OF5jIxi29DT778HkdeB4k=; b=W5RRUCXeGeiFeTdlM26TE8D8j6j9Rpd0bIFWpKF8bfiziJ0qlZY9KQj2GERmccI+DP cGC1NlSrppeX8dVaNqXy3UOEo+kGT/InY3R4VTlhDJAw9QqxY44FVYBG94DtRDEtog0k EpxOFz7RX+bfCgGygrWbLUV3fBCZ2ViaIr9UzJGT4H4+NX8c3dNYonq22kc4Rzwbd1mT rywDBYWMDnNT/rHB7L/n20hdP4qICq9S/+XB3FZ7jxV2sb+OgUpUQDNaTO95U3LDX5QX HqLaLl5IvDiwAbBMcObBL+C8VR+XSbSupBmp4bn3qQdqczXg/OKz7VkFnNRU0TE6hXpy hwYA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=ltllS6Eo; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:dcbf:4b53:b63f:3b41 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-4ba01fff195sor514395e9.17.2026.11.09.11.06.08 for (Google Transport Security); Mon, 09 Nov 2026 11:06:08 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:dcbf:4b53:b63f:3b41 as permitted sender) client-ip=2a06:5b06:b600:300:dcbf:4b53:b63f:3b41; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=ltllS6Eo; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:dcbf:4b53:b63f:3b41 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=1794251168; x=1794855968; 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=jpWbBVA7IBODq5+aBrosT7PkgACfwYIF502jnKlh22M=; b=ltllS6Eo15+tv2/SmGEhsaMzm6Bl/8oBuxHunxGWrQvfJTWj376JXCNA3/MyZOk56e 3/pWYgKdajUiL+OAzpv2beozMyap7qdDednMTfaDnuou87/FXp5r2COHGRotXIDy0RAU e92F997TuwMXwhfvzU3pwNaP3SoQlfsyFNDPZjGK0B8BpsbUrPXaSeS5Ao6g76rJ7qeH 3iGdtAXOoYQhmLgpH3fUGhWgR273jpeua++PnZFZhw7ELQBdGP2WPqN/C2TjEoqNC8yz m6KPb8ws0FAnqzIULd/eoHd8Jy/3sWgc6iVEJoLLwGf+OBYTxk/+wCkSRr8p32khLHcK QL9g== X-Received: by 2002:a05:600c:8b58:b0:4a2:150f:1605 with SMTP id 5b1f17b1804b1-4ba02349ddcmr2645545e9.24.1794251168485; Mon, 09 Nov 2026 11:06:08 -0800 (PST) Received: from athena.sw.ru ([2a06:5b06:b600:300:dcbf:4b53:b63f:3b41]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4ba01fba476sm10162755e9.2.2026.11.09.11.06.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2026 11:06:07 -0800 (PST) From: "Denis V. Lunev" To: khorenko@virtuozzo.com, andrey.zhadchenko@virtuozzo.com Date: Mon, 9 Nov 2026 20:06:01 +0100 Message-ID: <20261109190604.1850504-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/3] dm-ploop: fix writes to a read-only device hanging the host 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 A write that reaches a read-only ploop device never completes: the writer hangs in D state, and after a buffered write every later sync on the host hangs behind it until a reboot. Such writes come from a device stacked on top. libploop leaves the partition of "ploop mount -r" writable, which the ploop side fixes in openvz/ploop.ovz PR 513, and libvzctl attaches a backup disk to a Container that way and mounts it read-write (VSTOR-154096). Two bugs meet there: - when a cluster allocation or a discard fails, the pios parked on that BAT page are never resubmitted (patch 2). Any failing allocation leaves them stuck, not only one on a read-only device. Patch 1 moves the resubmission loop into a helper for it; - dm-ploop does not refuse writes to a read-only table, as dm-qcow2 does since 409d7e697578 (patch 3). The data of such a write reaches the image through f_op->write_iter(), while the allocation of a new cluster fails with EBADF and lands in the bug of patch 2. Tested on 6.12.0-211.52.1.22.19.vz10, dm-ploop built out of tree: - read-only ploop image, its partition mounted read-write, dd of 16M with conv=fsync. Stock: the writer and sync stuck in D state until a reboot, 12 writes in flight, the image changed. Patches 1-2: the fsync fails with EIO, nothing hangs, the image still changes. The whole series: the mount fails on its first superblock write, nothing hangs, the image is unchanged; - ploop test suite, make -j48 test on dev-cl04, green for ploop and qcow2 with this series together with the VSTOR-154182 one. Its new test overwrites a block through a linear device stacked on a read-only device: it fails on stock and passes with both series. Denis V. Lunev (3): dm-ploop: factor out ploop_dispatch_md_waiters() dm-ploop: fix pios stuck in md->wait_llist after a failed BAT update dm-ploop: fail writes to a read-only device drivers/md/dm-ploop-map.c | 41 ++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel