OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: andrey.zhadchenko@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.2 v2 0/8] dm-qcow2: fix image I/O completions using a freed target
Date: Mon, 30 Nov 2026 17:14:32 +0100	[thread overview]
Message-ID: <39a5cec6-a47b-4d8b-a6d5-a6257929d28f@virtuozzo.com> (raw)
In-Reply-To: <20261123153640.128227-1-den@openvz.org>

Andrey, waiting for a review from you.

Thank you in advance.

--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team

On 11/23/26 16:36, Denis V. Lunev wrote:
> Suspend waits only for the inflight references, so a completion in the
> backing file system's context can still free a helper qio into the
> target's pool, queue work on its workqueue or wake its service waiters
> after a remove has destroyed them. The same holds at backward merge
> complete for the merged image, its timer and its workers. Make every
> completion tail end with the release of whatever keeps the target or
> image alive, and make the destructors wait for the timers and work
> items that are not covered by that.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-156036
> 
> Tested in an HCI 8.2 VM with the races held open by hooks: stock oopses
> or corrupts slab in each, the series waits them out. The ploop test
> suite passes in qcow2 and ploop formats, and on the debug kernel with
> lockdep.
> 
> qcow2_presuspend() still skips a re-armed enospc_timer, which delays a
> suspend by the ENOSPC timeout; that is left for a separate patch.
> 
> v2: no new counter, as Andrey suggested: free a qio before its endio
>     callback and reference drop, and keep queue_work() under
>     deferred_lock. Also fix the service qio wake-up, the slow_wb_timer
>     and worker teardown and the merge work in the destructor.
> v1: http://lore.virtuozzo.com/kernel/20261119114914.767536-1-den@openvz.org/
> 
> Denis V. Lunev (8):
>   dm-qcow2: drop the qio argument of endio callbacks
>   dm-qcow2: fix do_qio_endio() freeing a qio into a destroyed pool
>   dm-qcow2: fix queue_work() after the target or image is freed
>   dm-qcow2: fix service_qio_endio() waking a freed target
>   dm-qcow2: fix qcow2_flush_deferred_activity() skipping a running timer
>   dm-qcow2: stop slow_wb_timer and flush the workers before freeing an
>     image
>   dm-qcow2: cancel the backward merge before destroying the workqueue
>   dm-qcow2: flush the backward merge work before freeing the target
> 
>  drivers/md/dm-qcow2-cmd.c    | 37 ++++++++++-------
>  drivers/md/dm-qcow2-map.c    | 80 ++++++++++++++++++++----------------
>  drivers/md/dm-qcow2-target.c | 29 +++++++------
>  drivers/md/dm-qcow2.h        |  8 ++--
>  4 files changed, 86 insertions(+), 68 deletions(-)
> 

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

      parent reply	other threads:[~2026-11-30 16:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 15:36 Denis V. Lunev
2026-11-23 15:36 ` [Devel] [PATCH hci-8.2 v2 1/8] dm-qcow2: drop the qio argument of endio callbacks Denis V. Lunev
2026-11-23 15:40   ` no-reply
2026-11-23 15:36 ` [Devel] [PATCH hci-8.2 v2 2/8] dm-qcow2: fix do_qio_endio() freeing a qio into a destroyed pool Denis V. Lunev
2026-11-23 15:41   ` no-reply
2026-11-23 15:36 ` [Devel] [PATCH hci-8.2 v2 3/8] dm-qcow2: fix queue_work() after the target or image is freed Denis V. Lunev
2026-11-23 15:42   ` no-reply
2026-11-23 15:36 ` [Devel] [PATCH hci-8.2 v2 4/8] dm-qcow2: fix service_qio_endio() waking a freed target Denis V. Lunev
2026-11-23 15:43   ` no-reply
2026-11-23 15:36 ` [Devel] [PATCH hci-8.2 v2 5/8] dm-qcow2: fix qcow2_flush_deferred_activity() skipping a running timer Denis V. Lunev
2026-11-23 15:45   ` no-reply
2026-11-23 15:36 ` [Devel] [PATCH hci-8.2 v2 6/8] dm-qcow2: stop slow_wb_timer and flush the workers before freeing an image Denis V. Lunev
2026-11-23 15:45   ` no-reply
2026-11-23 15:36 ` [Devel] [PATCH hci-8.2 v2 7/8] dm-qcow2: cancel the backward merge before destroying the workqueue Denis V. Lunev
2026-11-23 15:47   ` no-reply
2026-11-23 15:36 ` [Devel] [PATCH hci-8.2 v2 8/8] dm-qcow2: flush the backward merge work before freeing the target Denis V. Lunev
2026-11-23 15:48   ` no-reply
2026-11-24 10:57 ` [Devel] [PATCH hci-8.2 v2 0/8] dm-qcow2: fix image I/O completions using a freed target Alexander Ivanov
2026-11-30 16:14 ` Konstantin Khorenko [this message]

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=39a5cec6-a47b-4d8b-a6d5-a6257929d28f@virtuozzo.com \
    --to=khorenko@virtuozzo.com \
    --cc=andrey.zhadchenko@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