OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 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 v2 0/2] dm-ploop: fix writes held on ENOSPC never being retried
Date: Thu, 12 Nov 2026 13:50:05 +0100	[thread overview]
Message-ID: <179448780588.4060562.1730123165510396382.b4-review@b4> (raw)
In-Reply-To: <20261110190033.2976967-1-den@openvz.org>

Applying with these fixes on my side:
- dropped the "v2:" and "v1:" lines;
- "the held writes stay in D state" became "the writers stay in D
  state";
- put back why patch 1 goes first.

On Tue, 10 Nov 2026 20:00:31 +0100, Denis V. Lunev wrote:
> the dispatcher for the retry, so the held writes stay in D state until
> other I/O reaches the device (VSTOR-154182). The destructor is also
> made to stop the timer and the event work.

The writers wait in D state, not the held pios. The last sentence
replaced the v1 one that said why patch 1 has to come first; that
reason is now said nowhere. The new text:

    A write that fails with ENOSPC on the image is held and retried by
    enospc_timer, so that I/O resumes once space is freed. Nothing wakes
    the dispatcher for the retry, so the writers stay in D state until
    other I/O reaches the device (VSTOR-154182).

    Patch 1 makes the destructor stop the timer and the event work. It goes
    first because with patch 2 a timer that expires after the destructor
    also calls wake_up_process() on a dispatcher thread that is gone.

> v2: cancel event_work in ploop_destroy(), reword the messages.
> v1: http://lore.virtuozzo.com/kernel/20261109190657.1851487-1-den@openvz.org/

The cover goes into each commit as the "Patchset description", and the
version history does not belong in the git log.

Separate patch, not needed for this series; I created a task for
it:

1. ploop_try_delay_enospc(): hold deferred_lock from the wants_suspend
   test through schedule_work(). An ENOSPC endio that stalls between
   llist_add() and mod_timer() can see presuspend resubmit its pio, the
   request complete and the table go away, and then arm the timer and
   queue event_work on the freed struct. No cancel in ploop_destroy()
   can close that, as the endio itself touches the struct after the
   free. presuspend sets wants_suspend under deferred_lock, so holding
   it across the whole delay does. It needs an asynchronous ENOSPC
   completion that stalls across the teardown, and it is as old as the
   driver. This is what Sashiko's first remark on 1/2 comes down to.
   https://virtuozzo.atlassian.net/browse/VSTOR-154847

-- 
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-12 12:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 19:00 Denis V. Lunev
2026-11-10 19:00 ` [Devel] [PATCH hci-8.1 v2 1/2] dm-ploop: stop enospc_timer and event_work in ploop_destroy() Denis V. Lunev
2026-11-10 19:05   ` no-reply
2026-11-12 12:50   ` Konstantin Khorenko
2026-11-10 19:00 ` [Devel] [PATCH hci-8.1 v2 2/2] dm-ploop: fix the ENOSPC retry timer not waking the dispatcher Denis V. Lunev
2026-11-10 19:02   ` no-reply
2026-11-12 12:50   ` Konstantin Khorenko
2026-11-12 12:50 ` Konstantin Khorenko [this message]
2026-11-12 12:50 ` [Devel] [PATCH hci-8.1 v2 0/2] dm-ploop: fix writes held on ENOSPC never being retried 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=179448780588.4060562.1730123165510396382.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox