[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v7 02/20] qapi: Add lock-mode in blockdev-add option
From: |
Fam Zheng |
Subject: |
[Qemu-block] [PATCH v7 02/20] qapi: Add lock-mode in blockdev-add options |
Date: |
Mon, 8 Aug 2016 21:13:15 +0800 |
To allow overriding the default locking behavior when opening the image.
Signed-off-by: Fam Zheng <address@hidden>
---
qapi/block-core.json | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 5e2d7d7..d1eb197 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -2151,6 +2151,20 @@
'*debug-level': 'int' } }
##
+# @BlockdevLockMode
+#
+# Describes how QEMU should lock the image.
+#
+# @off: Disabled
+# @shared: Use shared lock for both RO and RW images.
+# @auto: Use exclusive lock for RW images, and shared lock for RO images.
+#
+# Since: 2.7
+##
+{ 'enum': 'BlockdevLockMode',
+ 'data': [ 'off', 'shared', 'auto' ] }
+
+##
# @BlockdevOptions
#
# Options for creating a block device. Many options are available for all
@@ -2172,6 +2186,8 @@
# @detect-zeroes: #optional detect and optimize zero writes (Since 2.1)
# (default: off)
#
+# @lock-mode: #optional how to lock the image. (default: auto) (Since 2.7)
+#
# Remaining options are determined by the block driver.
#
# Since: 1.7
@@ -2185,7 +2201,8 @@
'*cache': 'BlockdevCacheOptions',
'*aio': 'BlockdevAioOptions',
'*read-only': 'bool',
- '*detect-zeroes': 'BlockdevDetectZeroesOptions' },
+ '*detect-zeroes': 'BlockdevDetectZeroesOptions',
+ '*lock-mode': 'BlockdevLockMode' },
'discriminator': 'driver',
'data': {
'archipelago':'BlockdevOptionsArchipelago',
--
2.7.4
- [Qemu-block] [PATCH v7 00/20] block: Image locking series for 2.8, Fam Zheng, 2016/08/08
- [Qemu-block] [PATCH v7 01/20] block: Add flag bits for image locking, Fam Zheng, 2016/08/08
- [Qemu-block] [PATCH v7 02/20] qapi: Add lock-mode in blockdev-add options,
Fam Zheng <=
- [Qemu-block] [PATCH v7 03/20] block: Add and parse "lock-mode" option for image locking, Fam Zheng, 2016/08/08
- [Qemu-block] [PATCH v7 04/20] block: Introduce image file locking, Fam Zheng, 2016/08/08
- [Qemu-block] [PATCH v7 05/20] osdep: Add qemu_lock_fd and qemu_unlock_fd, Fam Zheng, 2016/08/08
- [Qemu-block] [PATCH v7 06/20] raw-posix: Add image locking support, Fam Zheng, 2016/08/08
- [Qemu-block] [PATCH v7 07/20] qemu-io: Add "-L" option for BDRV_O_NO_LOCK, Fam Zheng, 2016/08/08
- [Qemu-block] [PATCH v7 08/20] qemu-img: Add "-L" option to sub commands, Fam Zheng, 2016/08/08
- [Qemu-block] [PATCH v7 09/20] qemu-img: Update documentation of "-L" option, Fam Zheng, 2016/08/08
- [Qemu-block] [PATCH v7 10/20] qemu-nbd: Add "--no-lock/-L" option, Fam Zheng, 2016/08/08
- [Qemu-block] [PATCH v7 11/20] block: Don't lock drive-backup target image in none mode, Fam Zheng, 2016/08/08
- [Qemu-block] [PATCH v7 12/20] qemu-iotests: 046: Move version detection out from verify_io, Fam Zheng, 2016/08/08