OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: no-reply@sashiko.virtuozzo.com
To: "Denis V. Lunev" <den@openvz.org>, khorenko@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH vz10] ovl: release the upperdir/workdir in-use locks before the umount sync
Date: Fri, 6 Nov 2026 15:20:58 +0000	[thread overview]
Message-ID: <010701a1b172e02f-b86fbb5b-f4cb-4b7b-81a9-0c1d63bacd5a-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261106151641.3980601-1-den@openvz.org>

> From: Denis V. Lunev <den@openvz.org>
> 
> The in-use locks on upperdir and workdir are released by ovl_free_fs()
> from ->put_super(). generic_shutdown_super() calls sync_filesystem()
> before that, and ovl_sync_fs() syncs the whole upper filesystem, so the
> locks stay held across a journal commit and a cache flush of the upper
> fs after the overlay is gone. With index=on a new overlay that uses the
> same upperdir, or uses it as a lowerdir, fails to mount in that window:
> 
>   overlayfs: upperdir is in-use as upperdir/workdir of another mount,
>   mount with '-o index=off' to override exclusive upperdir protection.
> 
> Userspace hits this when the last reference is not dropped by umount(2)
> itself. Docker with the containerd snapshotter mounts a snapshot on a
> thread with a private mount namespace for docker cp and for buildkit,
> [ ... ]
> Fixes: 2cac0c00a6cd ("ovl: get exclusive ownership on upper/work dirs")
> Cc: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
> Cc: Konstantin Khorenko <khorenko@virtuozzo.com>
> Feature: fix ms/overlayfs
> Signed-off-by: Denis V. Lunev <den@openvz.org>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261106151641.3980601-1-den@openvz.org?part=1


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

  reply	other threads:[~2026-11-06 15:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 15:16 Denis V. Lunev
2026-11-06 15:20 ` no-reply [this message]
2026-11-06 18:12 ` Pavel Tikhomirov
2026-11-07 19:32 ` Denis V. Lunev

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=010701a1b172e02f-b86fbb5b-f4cb-4b7b-81a9-0c1d63bacd5a-000000@eu-central-1.amazonses.com \
    --to=no-reply@sashiko.virtuozzo.com \
    --cc=den@openvz.org \
    --cc=devel@openvz.org \
    --cc=khorenko@virtuozzo.com \
    /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