Signed-off-by: Silvan Kaiser <silvan@quobyte.com>
---
docs/system/qemu-block-drivers.rst.inc | 3 +++
qemu-options.hx | 10 ++++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/docs/system/qemu-block-drivers.rst.inc b/docs/system/qemu-block-drivers.rst.inc
index 384e95ba76..bdecbf39ca 100644
--- a/docs/system/qemu-block-drivers.rst.inc
+++ b/docs/system/qemu-block-drivers.rst.inc
@@ -882,6 +882,9 @@ the POSIX locking API will be used. In this case there is a risk that the lock
will get silently lost when doing hot plugging and block jobs, due to the
shortcomings of the POSIX locking API.
+To force the use of POSIX locks even when OFD locking is available, specify
+"locking=posix". The same caveats about silent lock loss apply.
+
QEMU transparently handles lock handover during shared storage migration. For
shared virtual disk images between multiple VMs, the "share-rw" device option
should be used.
diff --git a/qemu-options.hx b/qemu-options.hx
index 21972f8326..23502c5aa6 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1540,10 +1540,12 @@ SRST
default: threads)
``locking``
- Specifies whether the image file is protected with Linux OFD
- / POSIX locks. The default is to use the Linux Open File
- Descriptor API if available, otherwise no lock is applied.
- (auto/on/off, default: auto)
+ Specifies whether the image file is protected with locks.
+ 'on' enables locking, preferring OFD (Open File Descriptor)
+ locks if available, but falling back to POSIX locks with a
+ warning. 'posix' forces the use of POSIX locks. 'auto' (the
+ default) enables locking only if OFD locks are available.
+ 'off' disables locking. (on/off/auto/posix, default: auto)
Example:
--
2.47.3
--
Quobyte GmbH, Berlin, AG Charlottenburg HRB 149012 B, Dr. Felix Hupfeld,
Dr. Bjoern Kolbeck