From: no-reply@sashiko.virtuozzo.com
To: "Denis V. Lunev" <den@openvz.org>, andrey.zhadchenko@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 3/4] dm-ploop: wait for the ploop_allocator() thread before changing deltas[]
Date: Tue, 3 Nov 2026 08:42:38 +0000 [thread overview]
Message-ID: <010701a1a0931ca1-c0697013-3479-47f1-98e2-97bcb30ea312-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261103083642.130885-4-den@openvz.org>
> From: Denis V. Lunev <den@openvz.org>
>
> An allocating pio requests the preallocation of the top delta ahead of
> itself and does not wait when its cluster already fits, so the
> allocator can still be working when submission is suspended or the
> device is dm suspended. It looks up the top delta without a lock and
> keeps the pointer and the file across its truncate or fallocate, while
> a cmd rewrites deltas[] under neither of its locks:
>
> - merge and notify_merged_backward move the top delta one slot down and
> zero the old slot. The allocator then reads a zero file_size from it
> and truncates the live top image down to the preallocation size, or
> reads a NULL file and oopses;
>
> - flip_upper_deltas swaps the two upper slots of a dm suspended device.
> The allocator computes the new length from the size of the delta now
> on top and truncates the old top one, now holding data below it, to
> that length.
>
> Wait for the allocator to finish in ploop_suspend_submitting_pios()
> after the inflight pios are gone, and in ploop_postsuspend() before
> the device is marked suspended, which is what the flip checks. No pio
> can request a new preallocation at either point. Wake the waiters with
> wake_up(), as the one in ploop_postsuspend() sleeps uninterruptibly.
>
> Fixes: cf489cf22cd5 ("dm-ploop: make filespace preallocations async")
> Reported-by: Konstantin Khorenko <khorenko@virtuozzo.com>
> https://virtuozzo.atlassian.net/browse/VSTOR-152984
> Feature: dm-ploop: ploop target driver
> Signed-off-by: Denis V. Lunev <den@openvz.org>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261103083642.130885-1-den@openvz.org?part=3
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-03 8:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 8:36 [Devel] [PATCH hci-8.1 0/4] dm-ploop: fix the pio submission stop around cmds Denis V. Lunev
2026-11-03 8:36 ` [Devel] [PATCH hci-8.1 1/4] dm-ploop: fix pio submission racing with the suspend and resume of a cmd Denis V. Lunev
2026-11-03 8:40 ` no-reply
2026-11-04 17:14 ` Konstantin Khorenko
2026-11-03 8:36 ` [Devel] [PATCH hci-8.1 2/4] dm-ploop: fix a lost wakeup of the ploop_allocator() thread Denis V. Lunev
2026-11-03 8:39 ` no-reply
2026-11-04 17:14 ` Konstantin Khorenko
2026-11-03 8:36 ` [Devel] [PATCH hci-8.1 3/4] dm-ploop: wait for the ploop_allocator() thread before changing deltas[] Denis V. Lunev
2026-11-03 8:42 ` no-reply [this message]
2026-11-04 17:14 ` Konstantin Khorenko
2026-11-03 8:36 ` [Devel] [PATCH hci-8.1 4/4] dm-ploop: fix a failed cluster copy on grow leaving the BAT page busy Denis V. Lunev
2026-11-03 8:42 ` no-reply
2026-11-04 17:14 ` Konstantin Khorenko
2026-11-04 13:24 ` [Devel] [PATCH hci-8.1 0/4] dm-ploop: fix the pio submission stop around cmds Andrey Zhadchenko
2026-11-04 17:14 ` 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=010701a1a0931ca1-c0697013-3479-47f1-98e2-97bcb30ea312-000000@eu-central-1.amazonses.com \
--to=no-reply@sashiko.virtuozzo.com \
--cc=andrey.zhadchenko@virtuozzo.com \
--cc=den@openvz.org \
--cc=devel@openvz.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.