OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.2 v10 8/9] dm-ploop: reload metadata on resume
Date: Thu, 19 Nov 2026 16:50:27 +0100	[thread overview]
Message-ID: <179510342775.306553.8098102203469829801.b4-review@b4> (raw)
In-Reply-To: <20261119151547.3656812-9-alexander.ivanov@virtuozzo.com>

I won't apply this version, please send v11, items 1 and 2 of the
cover letter reply.

On Thu, 19 Nov 2026 16:15:46 +0100, Alexander Ivanov wrote:
> +void ploop_drop_prealloc(struct ploop *ploop)
> +{
> +	unsigned long flags;
> +
> +	spin_lock_irqsave(&ploop->bat_lock, flags);
> +	ploop->prealloc_size = 0;
> +	spin_unlock_irqrestore(&ploop->bat_lock, flags);
> +}

ploop_req_prealloc() wakes only the allocator thread, and
ploop_allocator() calls wake_up() only after it took a non-zero
prealloc_size. A drop between the request and the allocator's look
leaves the waiter of that request asleep with its condition already
true. The first ploop_stop_prealloc() in postsuspend runs before
ctl_rwsem, so a resize of the live device can be that waiter, and
postsuspend then blocks on ctl_rwsem with md->suspend_lock held.

> a message may slip in before the lock, and would make the reload skip
> silently. Keep metadata that is still dirty on resume, as md pages may

v10 warns on that skip now.

> ->suspended, and wait again: a message that took the lock first saw the
> device not suspended and left its requests. Messages to the suspended

Five sentences in this paragraph; start a new one at "Drop them once
more". "Both wait" below reads as the two kinds of requests, name
postsuspend and messages.

Your answer to Sashiko on v9, that standby is set only on completion
of DM data and flush bios, does not hold: resize and merge pios and
BAT writeback complete through ploop_data_rw_complete() too, which
calls ploop_check_standby_mode(). The wait is no worse than before
the series, so no change is asked, just do not put that claim in a
message.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

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

  reply	other threads:[~2026-11-19 15:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 15:15 [Devel] [PATCH hci-8.2 v10 0/9] dm-ploop: give back unused tail of top delta on suspend Alexander Ivanov
2026-11-19 15:15 ` [Devel] [PATCH hci-8.2 v10 1/9] dm-ploop: reject a delta header whose BAT does not cover the target Alexander Ivanov
2026-11-19 15:15 ` [Devel] [PATCH hci-8.2 v10 2/9] dm-ploop: reject empty deltas Alexander Ivanov
2026-11-19 15:15 ` [Devel] [PATCH hci-8.2 v10 3/9] dm-ploop: set delta is_raw before applying its mappings Alexander Ivanov
2026-11-19 15:15 ` [Devel] [PATCH hci-8.2 v10 4/9] dm-ploop: factor out ploop_read_delta() from ploop_add_delta() Alexander Ivanov
2026-11-19 15:15 ` [Devel] [PATCH hci-8.2 v10 5/9] dm-ploop: take bat_lock around md page lookup in ploop_llseek_hole() Alexander Ivanov
2026-11-19 15:15 ` [Devel] [PATCH hci-8.2 v10 6/9] dm-ploop: fix use-after-free on the last inflight_md decrement Alexander Ivanov
2026-11-19 15:15 ` [Devel] [PATCH hci-8.2 v10 7/9] dm-ploop: fix flip_upper_deltas racing with resume Alexander Ivanov
2026-11-19 15:15 ` [Devel] [PATCH hci-8.2 v10 8/9] dm-ploop: reload metadata on resume Alexander Ivanov
2026-11-19 15:50   ` Konstantin Khorenko [this message]
2026-11-19 15:15 ` [Devel] [PATCH hci-8.2 v10 9/9] dm-ploop: truncate unused tail of top delta on suspend Alexander Ivanov
2026-11-19 15:50 ` [Devel] [PATCH hci-8.2 v10 0/9] dm-ploop: give back " Konstantin Khorenko
2026-11-20  8:17   ` Alexander Ivanov

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=179510342775.306553.8098102203469829801.b4-review@b4 \
    --to=khorenko@virtuozzo.com \
    --cc=alexander.ivanov@virtuozzo.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox