From: "Denis V. Lunev" <den@openvz.org>
To: alexander.ivanov@virtuozzo.com, vasileios.almpanis@virtuozzo.com
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.2] dm-ploop: allocate the mtfile array as pointers, not struct files
Date: Thu, 19 Nov 2026 12:47:29 +0100 [thread overview]
Message-ID: <20261119114729.764853-1-den@openvz.org> (raw)
From: Denis V. Lunev <den@openvz.org>
ploop_add_delta() sizes each slot of the per-runner clone array with
sizeof(*file), a whole struct file, although the array holds struct
file pointers. With nkt_runners equal to nr_cpu_ids, a host with a few
hundred possible CPUs asks for a costly-order contiguous allocation,
which can fail under fragmentation and takes the table load down the
error path.
Size the slots by the element type.
https://virtuozzo.atlassian.net/browse/VSTOR-156035
Fixes: 762b90ec3324 ("dm-ploop: use filp per thread")
Feature: dm-ploop: ploop target driver
Signed-off-by: Denis V. Lunev <den@openvz.org>
---
Applies on top of "dm-ploop: fix a double fput of the delta file when
ploop_add_delta() fails".
drivers/md/dm-ploop-bat.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-ploop-bat.c b/drivers/md/dm-ploop-bat.c
index a2799f4aeb17..3a44f7480ff2 100644
--- a/drivers/md/dm-ploop-bat.c
+++ b/drivers/md/dm-ploop-bat.c
@@ -504,8 +504,8 @@ int ploop_add_delta(struct ploop *ploop, u32 level, struct file *file, bool is_r
ploop_apply_delta_mappings(ploop, deltas, level, &md_root, nr_be);
- deltas[level].mtfile = kcalloc(ploop->nkt_runners, sizeof(*file),
- GFP_KERNEL);
+ deltas[level].mtfile = kcalloc(ploop->nkt_runners,
+ sizeof(*deltas[level].mtfile), GFP_KERNEL);
if (!deltas[level].mtfile) {
ret = -ENOMEM;
goto out;
--
2.55.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next reply other threads:[~2026-11-19 11:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 11:47 Denis V. Lunev [this message]
2026-11-19 12:12 ` Alexander Ivanov
2026-11-19 16:05 ` Konstantin Khorenko
2026-11-19 16:05 ` Konstantin Khorenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261119114729.764853-1-den@openvz.org \
--to=den@openvz.org \
--cc=alexander.ivanov@virtuozzo.com \
--cc=devel@openvz.org \
--cc=vasileios.almpanis@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox