All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: "Denis V. Lunev" <den@openvz.org>
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: Wed, 04 Nov 2026 18:14:19 +0100	[thread overview]
Message-ID: <179381245948.2686233.11614432698632102545.b4-review@b4> (raw)
In-Reply-To: <20261103083642.130885-4-den@openvz.org>

I won't apply this version, please send v2 with the changes below.

On Tue, 03 Nov 2026 09:36:41 +0100, Denis V. Lunev wrote:
>  static void ploop_postsuspend(struct dm_target *ti)
>  {
> +	struct ploop *ploop = ti->private;
> +
> +	wait_event(ploop->dispatcher_wq_prealloc,
> +		   ploop_no_pending_prealloc(ploop));
>  	ploop_set_suspended(ti, true);
>  }

Item 3 of the cover letter reply, code: also wait for
ploop_no_pending_prealloc() in ploop_flip_upper_deltas() before
process_flip_upper_deltas(), keep this wait.

Why: a resize on a dm suspended device re-arms the allocator after this
wait. ploop_resize() does not check ->suspended, and the grow allocates
through ploop_prepare_reloc_index_wb() and ploop_allocate_cluster(),
which requests a preallocation and does not wait when the cluster fits.
So suspend, set_noresume 1, resize, flip_upper_deltas still lets the
flip swap the slots under a running allocator, which is the truncation
this patch fixes.

> - 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

Item 3 of the cover letter reply, message: "merge and notify_merged".

Why: notify_delta_merged() renumbers the slots above @level for forward
as well. The code already covers it through
ploop_suspend_submitting_pios(), only the message is narrower than the
fix.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  parent reply	other threads:[~2026-11-04 17:15 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
2026-11-04 17:14   ` Konstantin Khorenko [this message]
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=179381245948.2686233.11614432698632102545.b4-review@b4 \
    --to=khorenko@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.