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 5E147803BB for ; Tue, 17 Nov 2026 18:24:26 +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 6AHIN7Ec011961; Tue, 17 Nov 2026 21:23:08 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AHIN7Ec011961 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="xNWkDwP2" 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 6AHIN6gO011939 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 17 Nov 2026 21:23:06 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AHIN6gO011939 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-4915ba023d4so38968f8f.0 for ; Tue, 17 Nov 2026 10:23:06 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErGI8LcF6lcioT6mzPIzr+kK/eRpwXndEp2pZWIp/mpXiiXMMVicKDv/NApGbLvEKf6JRFj3DQ==@openvz.org X-Gm-Message-State: APuU4Z/2IBMuut/MtzruGtOMJiTTCnVeZRBLEHsp6NDwO421OZtGP37g YXISL58GTyPOdRvif9FhaSNc9t6y0Cp0gCAlNoLLWmrbeJjqm/sKy9/smq9zsFzCp0ofFKtFFZS OrQxUHvSAeQEbCBcFmzYEVKgQ2A+8HdzQlJCWUInLbHkXWLU6bSzuTg== X-Gm-Gg: AZFdTZdUMnIXtGQ1ZHVhjGKg3Ww2zXpqIJJY0qviRCiUiMyc2l0ImsKdJpsTNXKb78N mgKE9+MLm06DFi9ZxkPlXL5R20sMRqiaMH1QsUptxGGqyqlAjPplFW0Jax0ak0incemuy2jGyi2 ykoGgeEHUBQGLRMijwc1Bj16pYfwhIFCw1LNY1fCgv/VpJL1heVuUQuwZI+Az+TRhkD0J6yEu5b q/bBDlrBfWZlPzEMI6jGlaDowN/hrSP/AArPKYLbt6EqlCfHLp/ROIsLPhj314hhVIZkzS+7Pff xNXMnz8VXJE1IuFNpTDai1igElPXlvFvlOurCSWr9qunjxy5dZgfNTy8XpcWSbJtsCc0Za3QQnT 8wrpldjJ1XoFoHqZu X-Received: by 2002:a05:6000:178b:b0:496:42eb:e0fd with SMTP id ffacd0b85a97d-4a63dd58a47mr679944f8f.31.1794939785780; Tue, 17 Nov 2026 10:23:05 -0800 (PST) X-Received: by 2002:a05:6000:178b:b0:496:42eb:e0fd with SMTP id ffacd0b85a97d-4a63dd58a47mr679886f8f.31.1794939785333; Tue, 17 Nov 2026 10:23:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794939785; cv=none; d=google.com; s=arc-20260327; b=Q6IByFDW9cAJemKMCL6xYixXKhcCzmGAzwK6f4mUg0qLqD2oQT1rdDwV78bqTaq+1i R4J9VNYYpeS3mIMGctKyAjKpvvsfwpq00D9hFFFpG9fspA2ZUO9FGHR0be18Vu7ZG4iR i1ypycTnf6iIC2Qx5G7VUrzjcsIHPI+0NEnFdtzSsXM7JPb9nQTCBDB3wRC0hw+4h+w4 Y/qn7xXYTmjvxCgfLnctJMhtN+o65AVUxODvMCfctE7rQ/gDlp/cTNM0lp63ISmJWJVe y1wM0xDzRcUU3L6jq6Jf4LHLcSdZk7WecayEI+MtZ1rZsCwhutc5oclwvpFSaghK2VuR koqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=message-id:date:references:in-reply-to:cc:to:from:subject :content-transfer-encoding:mime-version:dkim-signature; bh=knUFXTu1l6/gauVXpwkzH4+sBvx3wrkl9ZUODqmxrCs=; fh=YDx/sgeCfUIZ9eyfBjqETg92hV70ladS2omuMPCV2do=; b=gEnW9toeuOejHluGDqyrcYDCd9cvIh3frw8pV+UjBiIEtZmE8bFMxMeE3r5D7Ime0p 6eTI9aXsv/NMZjE2NMkxY8svLvnAT4s+drlnyxwo8wgjsIQE/yZdSFWwtWDRRO8SpTdL neoKGddhUfC01yUoqqt8296LyKkxUX+RlQPytW67C4WJKEErEuJ4UsJnsz1Qv2WqrVmi DyX3QEeSiyl1PrnrAHxRLHLCaes5Jb6aJ9On+b4l+Y7CNXBm3NOY+w2bP4H9BPb3qmmA Y+SQS2elQRdeie5093gbmYJprPTOkH5MntZ9yQc6bWbHkV0zDZcCO1u+dxARvHUGaDKy Y8nA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=xNWkDwP2; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-4a6573bcc99si155484f8f.121.2026.11.17.10.23.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2026 10:23:05 -0800 (PST) Received-SPF: pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=xNWkDwP2; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Message-Id:Date:From:Subject:Content-Type: MIME-Version; bh=knUFXTu1l6/gauVXpwkzH4+sBvx3wrkl9ZUODqmxrCs=; b=xNWkDwP2aSNN cu69wx2ldBB1f/96Kw2IOgMoNCfhZUjiJ9+gJdEER8BUsJCIcgFjLT6uhkgYOQxxrbTwXNZI7YKmo J54mg/4DPAQDJQs3iQFf4n2W7z/Ez9YSF7xZ9QQOtTx43r/uP8/tgS+uPlBolRpq5UUZ/tctScskl i1/i5vSQ2iF0dCUZu1Ifiy/S9SQMBEYs2FevBXD+ZkMFwunlow0UsYSL2fzwgdH93y+bMFyGqCDay WwJlCCeCf8722bVTQmBo2hBtxlH5rG149wNAq3K4KwtOdKj87bgWbMlHvxvSTB8fsS3qU2tqMHc6i FbDxj037MI9+8SMEzjiOvw==; Received: from ch-demo-asa.virtuozzo.com ([130.117.225.8] helo=f0.sw.ru) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1xTNlP-0012zS-33; Tue, 17 Nov 2026 19:22:54 +0100 MIME-Version: 1.0 From: Konstantin Khorenko To: Alexander Ivanov In-Reply-To: <20261117171743.3216794-1-alexander.ivanov@virtuozzo.com> References: <20261117171743.3216794-1-alexander.ivanov@virtuozzo.com> Date: Tue, 17 Nov 2026 19:23:02 +0100 Message-Id: <179493978229.173269.14776614188985558166.b4-review@b4> X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2890; i=khorenko@virtuozzo.com; h=from:subject:message-id; bh=2SJFWW1HmOgE0CIkzM71otaRjo4X13q673XCXRlGvgc=; b=owEBbQKS/ZANAwAKAVGWCkf5YVwqAcsmYgBq/JuGcqNN4nZv8ie4Xh9uP7rja53DGK+csuw3v R9nXdOvtAuJAjMEAAEKAB0WIQRWD23IPcXT0GO9CCxRlgpH+WFcKgUCavybhgAKCRBRlgpH+WFc KpEVD/406gNmAgFIXnbK6B4/Te+/8bqlCAKyeB9NMr95HJCnN41jMaejopwhDXqTkwz3t2NXoSm QQ4ZUVOGeTUhHE2bsPfoZaTCF9pjyuVVrTpPdbDI4u9sznf+SXmU/g0PVY9fDCxemGAquJsu5U1 p5VKrTfJochQuDUxNV1W2oSkQ0bEfUDdhzn12eRzSV1mvZ+Ejcskq4Q2XKsBmah2KPiuiXl8tyQ U4I3MQzfwnSuOVStSF2F8Q5pGszltGyLnK4KnR6xQpmcAcpBmZTahwVy8VXkrobqfYSE6TZQy63 aJXzC6vRk/FEmfrOoSPR1sSffxvacoWZ6k7AHHKoOrm1EsUEDCXDF76+2A0fJiAkGzua5+dvE4l GmBXnKrNGvHX7ioef4uZbj3JRSyb35OLJTj8bhrEs0A4MdVSdkG3OaDWe5mS1eBCPbLRJqJXjXm xXW109Xije3rhUqsLDQ+LnvCfqA1NEpQUuKCo4d/kWAFX33Uj2wiilysFaC+rxFJC3sEFsQE9OQ tSAIP+CoX6VgeLPGW9n6MO9ZfKfyK0ctMOO5kSRp0GK+cHpmkhKQHD/sr2Z8nBfnW28RrRk+tcZ 0FL1lmPgFyulHnz8BgTQfRRxah9v+N9ydQ11IOvoAMN1DBrxkp4utn2DZiu6bIeML4Qi0DDpqr4 svh6tQL5yOmGs8g== X-Developer-Key: i=khorenko@virtuozzo.com; a=openpgp; fpr=560F6DC83DC5D3D063BD082C51960A47F9615C2A X-OZ-Fwd: true Cc: devel@openvz.org Subject: Re: [Devel] [PATCH hci-8.1 v7 00/10] dm-ploop: give back unused tail of top delta on suspend 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 I won't apply this version, please send v8 with the changes below. 1. Cover letter: it is the b4 placeholder. Say why the series is needed, which patches are fixes and which build the feature, the userspace part it depends on and the deploy order, and what changed since v6. 2. 9/10: a killed or skipped wait for preallocation in postsuspend lets the old allocator shrink the top delta under the next table. Make the allocator unable to shrink the file, or keep the wait uninterruptible outside standby; name a5836033b8fe9 in the message. 3. 9/10: wait for inflight_md in ploop_preresume() too: a resize on the suspended device can leave it non-zero, and the WARN_ON_ONCE() in ploop_reload_metadata() fires. 4. 9/10, 10/10: the comment "Here must be the only place to change file_size" in ploop_preallocate_cluster() is not true any more. 5. 7/10: the comment of ploop_dec_inflight_md() says waiters take the lock before acting on zero; the postsuspend wait of 9/10 does not. Say that ploop_destroy() takes the lock, which is what keeps it safe. 6. 6/10: fold it into 7/10, which replaces both lines it changes. 7. 10/10 message: the file size check is best effort, and removal of a live device runs the suspend hooks from __dm_destroy() only because an open device cannot be removed; say both. 8. Fixes: 90bb85536272 ("dm-ploop: Add ploop target driver") on 1/10, 2/10, 3/10 and 8/10; Fixes: d1a1e5108aeb ("dm-ploop: add inflight metadata writeback counter") on 7/10. In 3/10 cite 90bb85536272 too: 6ddad5a4d226 is not in this branch. Separate patches, not needed for this series. I created a task: 1. ploop_add_delta() stores the file in deltas[level].file before it clones it; if kcalloc() or file_clone_open() fails, the file is put twice, at err_fput and in ploop_destroy(). https://virtuozzo.atlassian.net/browse/VSTOR-155723 On Tue, 17 Nov 2026 18:17:34 +0100, Alexander Ivanov wrote: > *** BLURB HERE *** 2. The table reload case: the suspending process is killed while postsuspend waits for the allocator of the old table. The new table reloads metadata and preallocates. The old allocator then calls do_ftruncate() with the new_len it computed from its stale file_size, and ploop_truncate_prealloc_safe() compares new_len only with that stale size, so the file shrinks and the clusters the new table has written are cut. The next load fails with -EPROTO. a5836033b8fe9 made this wait uninterruptible for that reason. 3. ploop_put_piwb() calls complete() before ploop_dec_inflight_md(). A "resize" message on the suspended device returns as soon as it is woken; a resume right after it sees inflight_md == 1, the WARN fires, which panics hosts with panic_on_warn, and the reload is skipped. Thanks. -- Konstantin Khorenko, Virtuozzo Linux Kernel Team _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel