From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Silvan Kaiser <silvan@quobyte.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, kwolf@redhat.com,
hreitz@redhat.com, pierrick.bouvier@linaro.org,
eblake@redhat.com, armbru@redhat.com
Subject: Re: [PATCH v1 0/3] block: Add 'posix' option for file locking
Date: Fri, 27 Mar 2026 11:40:51 +0000 [thread overview]
Message-ID: <acZsw79BucObyWwx@redhat.com> (raw)
In-Reply-To: <CALsyUnNqhkeA4jNP3XvNkUTJwa+O9MtkY38Kg3LK4TvB8J3BDw@mail.gmail.com>
On Fri, Mar 27, 2026 at 12:25:41PM +0100, Silvan Kaiser wrote:
> On FUSE, OFD locks are indeed indistinguishable from POSIX locks for the
> underlying fs, which is part of the problem — the filesystem can't ensure
> the correct handling.
QEMU will currently request an OFD lock, which will silently degrade
to be POSIX lock semantics on FUSE. QEMU is fine with POSIX lock
semantics in general, we merely prefer OFD if possible.
This patch adding a "posix" option will cause QEMU to request a POSIX
lock, which will have the same semantics we already get.
How is adding this 'posix' option a benefit ?
> The practical issue we're hitting is stale locks not being cleaned up
> across service restarts (e.g. Kolla/Cinder container restarts), which can
> block volume access.
How does this patch help solve that ?
> There's also a detection caveat: QEMU probes OFD capability against
> /dev/null, which reliably reflects kernel support but says nothing about
> the locking semantics of a remote filesystem actually serving the images.
> Combined with varying OFD support across different versions of various
> remote file systems, an explicit POSIX flag would give operators a
> straightforward way to ensure consistent, predictable behaviour in setups
> where OFD lock semantics cannot be relied upon.
The distinction between OFD & POSIX only matter at a client process
level, it shouldn't affect remote use. OFD locks just fix the crazy
POSIX semantics where closing any FD pointing to the file in QEMU
would release the locks, even if thy were held on a different FD in
QEMU.
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
prev parent reply other threads:[~2026-03-27 11:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 9:19 [PATCH v1 0/3] block: Add 'posix' option for file locking Silvan Kaiser
2026-03-26 9:19 ` [PATCH 1/3] " Silvan Kaiser
2026-03-26 9:19 ` [PATCH 2/3] docs/system: Document locking=posix option for file block driver Silvan Kaiser
2026-03-26 9:19 ` [PATCH 3/3] tests/qemu-iotests: Add test 315 for locking=posix Silvan Kaiser
2026-03-26 9:34 ` [PATCH v1 0/3] block: Add 'posix' option for file locking Daniel P. Berrangé
2026-03-27 11:25 ` Silvan Kaiser
2026-03-27 11:40 ` Daniel P. Berrangé [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=acZsw79BucObyWwx@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=silvan@quobyte.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.