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 1/2] dm-ploop: stop enospc_timer and event_work in ploop_destroy()
Date: Thu, 12 Nov 2026 13:50:05 +0100 [thread overview]
Message-ID: <179448780588.4060562.7357368070934002149.b4-review@b4> (raw)
In-Reply-To: <20261110190033.2976967-2-den@openvz.org>
Applying with these fixes on my side:
- "Once the device is removed" became "Once the table is destroyed, on
device removal or table reload".
On Tue, 10 Nov 2026 20:00:32 +0100, Denis V. Lunev wrote:
> that fails with ENOSPC around the presuspend leaves the timer pending
> and the work queued after the suspend. Once the device is removed, the
> timer expires on the struct ploop that ploop_dtr() freed, and
> do_ploop_event_work() reads ploop->ti from it.
A table reload frees the old struct ploop the same way: do_resume()
suspends, swaps and then destroys the old table, so the race is there
too.
> if (ploop->kt_worker) {
> + timer_shutdown_sync(&ploop->enospc_timer);
> + cancel_work_sync(&ploop->event_work);
> ploop->force_md_writeback = 1;
The code is right. Sashiko's two remarks on it do not block it:
- Pios stranded on enospc_pios: cannot happen. A parked pio is a
request in flight, and dm calls ploop_dtr() only after all requests
are done: __dm_destroy() waits for md->holders, a reload waits in
dm_suspend(). Until then the timer is alive and, with patch 2,
resubmits the pio.
- event_work queued after the cancel: the only window left is in the
ENOSPC endio itself, between llist_add() and schedule_work(). Its own
mod_timer() and schedule_work() hit the freed struct there, so a
second cancel would not help. It is older than this patch; see the
separate-patch block in the cover letter reply.
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev 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 [Devel] [PATCH hci-8.1 v2 0/2] dm-ploop: fix writes held on ENOSPC never being retried 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 [this message]
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 ` [Devel] [PATCH hci-8.1 v2 0/2] dm-ploop: fix writes held on ENOSPC never being retried Konstantin Khorenko
2026-11-12 12:50 ` 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.7357368070934002149.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