Benoît Canet | 5db1509 | 2014-06-05 13:45:30 +0200 | [diff] [blame] | 1 | # -*- Mode: Python -*- |
Andrea Bolognani | f7160f3 | 2020-07-29 20:50:24 +0200 | [diff] [blame] | 2 | # vim: filetype=python |
Marc-André Lureau | d3a4837 | 2017-01-13 15:41:23 +0100 | [diff] [blame] | 3 | |
| 4 | ## |
Markus Armbruster | f5cf31c | 2017-08-24 21:14:08 +0200 | [diff] [blame] | 5 | # == Block core (VM unrelated) |
Marc-André Lureau | d3a4837 | 2017-01-13 15:41:23 +0100 | [diff] [blame] | 6 | ## |
Benoît Canet | 5db1509 | 2014-06-05 13:45:30 +0200 | [diff] [blame] | 7 | |
Benoît Canet | 5db1509 | 2014-06-05 13:45:30 +0200 | [diff] [blame] | 8 | { 'include': 'common.json' } |
Markus Armbruster | 2031c13 | 2017-08-24 21:14:06 +0200 | [diff] [blame] | 9 | { 'include': 'crypto.json' } |
Kevin Wolf | bf42508 | 2018-05-16 16:03:10 +0200 | [diff] [blame] | 10 | { 'include': 'job.json' } |
Markus Armbruster | a2ff5a4 | 2017-08-24 21:13:56 +0200 | [diff] [blame] | 11 | { 'include': 'sockets.json' } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 12 | |
| 13 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 14 | # @SnapshotInfo: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 15 | # |
| 16 | # @id: unique snapshot id |
| 17 | # |
| 18 | # @name: user chosen name |
| 19 | # |
| 20 | # @vm-state-size: size of the VM state |
| 21 | # |
| 22 | # @date-sec: UTC date of the snapshot in seconds |
| 23 | # |
| 24 | # @date-nsec: fractional part in nano seconds to be used with date-sec |
| 25 | # |
| 26 | # @vm-clock-sec: VM clock relative to boot in seconds |
| 27 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 28 | # @vm-clock-nsec: fractional part in nano seconds to be used with |
| 29 | # vm-clock-sec |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 30 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 31 | # @icount: Current instruction count. Appears when execution |
| 32 | # record/replay is enabled. Used for "time-traveling" to match |
| 33 | # the moment in the recorded execution with the snapshots. This |
| 34 | # counter may be obtained through @query-replay command (since |
| 35 | # 5.2) |
Pavel Dovgalyuk | b39847a | 2020-10-03 20:13:08 +0300 | [diff] [blame] | 36 | # |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 37 | # Since: 1.3 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 38 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 39 | { 'struct': 'SnapshotInfo', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 40 | 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int', |
| 41 | 'date-sec': 'int', 'date-nsec': 'int', |
Pavel Dovgalyuk | b39847a | 2020-10-03 20:13:08 +0300 | [diff] [blame] | 42 | 'vm-clock-sec': 'int', 'vm-clock-nsec': 'int', |
| 43 | '*icount': 'int' } } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 44 | |
| 45 | ## |
Daniel P. Berrange | 0a12f6f | 2017-06-23 17:24:18 +0100 | [diff] [blame] | 46 | # @ImageInfoSpecificQCow2EncryptionBase: |
| 47 | # |
| 48 | # @format: The encryption format |
| 49 | # |
| 50 | # Since: 2.10 |
| 51 | ## |
| 52 | { 'struct': 'ImageInfoSpecificQCow2EncryptionBase', |
| 53 | 'data': { 'format': 'BlockdevQcow2EncryptionFormat'}} |
| 54 | |
| 55 | ## |
| 56 | # @ImageInfoSpecificQCow2Encryption: |
| 57 | # |
| 58 | # Since: 2.10 |
| 59 | ## |
| 60 | { 'union': 'ImageInfoSpecificQCow2Encryption', |
| 61 | 'base': 'ImageInfoSpecificQCow2EncryptionBase', |
| 62 | 'discriminator': 'format', |
Anton Nefedov | 29cd040 | 2018-06-18 11:40:06 +0300 | [diff] [blame] | 63 | 'data': { 'luks': 'QCryptoBlockInfoLUKS' } } |
Daniel P. Berrange | 0a12f6f | 2017-06-23 17:24:18 +0100 | [diff] [blame] | 64 | |
| 65 | ## |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 66 | # @ImageInfoSpecificQCow2: |
| 67 | # |
| 68 | # @compat: compatibility level |
| 69 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 70 | # @data-file: the filename of the external data file that is stored in |
| 71 | # the image and used as a default for opening the image |
| 72 | # (since: 4.0) |
Kevin Wolf | 9b890bd | 2019-01-15 19:02:40 +0100 | [diff] [blame] | 73 | # |
Kevin Wolf | 6c3944d | 2019-02-22 14:29:38 +0100 | [diff] [blame] | 74 | # @data-file-raw: True if the external data file must stay valid as a |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 75 | # standalone (read-only) raw image without looking at qcow2 |
| 76 | # metadata (since: 4.0) |
Kevin Wolf | 6c3944d | 2019-02-22 14:29:38 +0100 | [diff] [blame] | 77 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 78 | # @extended-l2: true if the image has extended L2 entries; only valid |
| 79 | # for compat >= 1.1 (since 5.2) |
Alberto Garcia | 7be2025 | 2020-07-10 18:13:13 +0200 | [diff] [blame] | 80 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 81 | # @lazy-refcounts: on or off; only valid for compat >= 1.1 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 82 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 83 | # @corrupt: true if the image has been marked corrupt; only valid for |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 84 | # compat >= 1.1 (since 2.2) |
Max Reitz | 9009b19 | 2014-09-30 21:31:28 +0200 | [diff] [blame] | 85 | # |
Max Reitz | 0709c5a | 2015-02-10 15:28:44 -0500 | [diff] [blame] | 86 | # @refcount-bits: width of a refcount entry in bits (since 2.3) |
| 87 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 88 | # @encrypt: details about encryption parameters; only set if image is |
| 89 | # encrypted (since 2.10) |
Daniel P. Berrange | 0a12f6f | 2017-06-23 17:24:18 +0100 | [diff] [blame] | 90 | # |
Andrey Shinkevich | b8968c8 | 2019-02-08 18:06:07 +0300 | [diff] [blame] | 91 | # @bitmaps: A list of qcow2 bitmap details (since 4.0) |
| 92 | # |
Denis Plotnikov | 572ad97 | 2020-05-07 11:25:18 +0300 | [diff] [blame] | 93 | # @compression-type: the image cluster compression method (since 5.1) |
| 94 | # |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 95 | # Since: 1.7 |
| 96 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 97 | { 'struct': 'ImageInfoSpecificQCow2', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 98 | 'data': { |
| 99 | 'compat': 'str', |
Kevin Wolf | 9b890bd | 2019-01-15 19:02:40 +0100 | [diff] [blame] | 100 | '*data-file': 'str', |
Kevin Wolf | 6c3944d | 2019-02-22 14:29:38 +0100 | [diff] [blame] | 101 | '*data-file-raw': 'bool', |
Alberto Garcia | 7be2025 | 2020-07-10 18:13:13 +0200 | [diff] [blame] | 102 | '*extended-l2': 'bool', |
Max Reitz | 9009b19 | 2014-09-30 21:31:28 +0200 | [diff] [blame] | 103 | '*lazy-refcounts': 'bool', |
Max Reitz | 0709c5a | 2015-02-10 15:28:44 -0500 | [diff] [blame] | 104 | '*corrupt': 'bool', |
Daniel P. Berrange | 0a12f6f | 2017-06-23 17:24:18 +0100 | [diff] [blame] | 105 | 'refcount-bits': 'int', |
Andrey Shinkevich | b8968c8 | 2019-02-08 18:06:07 +0300 | [diff] [blame] | 106 | '*encrypt': 'ImageInfoSpecificQCow2Encryption', |
Denis Plotnikov | 572ad97 | 2020-05-07 11:25:18 +0300 | [diff] [blame] | 107 | '*bitmaps': ['Qcow2BitmapInfo'], |
| 108 | 'compression-type': 'Qcow2CompressionType' |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 109 | } } |
| 110 | |
| 111 | ## |
| 112 | # @ImageInfoSpecificVmdk: |
| 113 | # |
| 114 | # @create-type: The create type of VMDK image |
| 115 | # |
| 116 | # @cid: Content id of image |
| 117 | # |
| 118 | # @parent-cid: Parent VMDK image's cid |
| 119 | # |
| 120 | # @extents: List of extent files |
| 121 | # |
| 122 | # Since: 1.7 |
| 123 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 124 | { 'struct': 'ImageInfoSpecificVmdk', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 125 | 'data': { |
| 126 | 'create-type': 'str', |
| 127 | 'cid': 'int', |
| 128 | 'parent-cid': 'int', |
Hanna Reitz | 456e751 | 2022-06-20 18:26:55 +0200 | [diff] [blame] | 129 | 'extents': ['VmdkExtentInfo'] |
| 130 | } } |
| 131 | |
| 132 | ## |
| 133 | # @VmdkExtentInfo: |
| 134 | # |
| 135 | # Information about a VMDK extent file |
| 136 | # |
| 137 | # @filename: Name of the extent file |
| 138 | # |
Markus Armbruster | 9e27207 | 2023-07-20 09:16:09 +0200 | [diff] [blame] | 139 | # @format: Extent type (e.g. FLAT or SPARSE) |
Hanna Reitz | 456e751 | 2022-06-20 18:26:55 +0200 | [diff] [blame] | 140 | # |
| 141 | # @virtual-size: Number of bytes covered by this extent |
| 142 | # |
| 143 | # @cluster-size: Cluster size in bytes (for non-flat extents) |
| 144 | # |
| 145 | # @compressed: Whether this extent contains compressed data |
| 146 | # |
| 147 | # Since: 8.0 |
| 148 | ## |
| 149 | { 'struct': 'VmdkExtentInfo', |
| 150 | 'data': { |
| 151 | 'filename': 'str', |
| 152 | 'format': 'str', |
| 153 | 'virtual-size': 'int', |
| 154 | '*cluster-size': 'int', |
| 155 | '*compressed': 'bool' |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 156 | } } |
| 157 | |
| 158 | ## |
Or Ozeri | 42e4ac9 | 2021-06-27 14:46:35 +0300 | [diff] [blame] | 159 | # @ImageInfoSpecificRbd: |
| 160 | # |
| 161 | # @encryption-format: Image encryption format |
| 162 | # |
| 163 | # Since: 6.1 |
| 164 | ## |
| 165 | { 'struct': 'ImageInfoSpecificRbd', |
| 166 | 'data': { |
| 167 | '*encryption-format': 'RbdImageEncryptionFormat' |
| 168 | } } |
| 169 | |
| 170 | ## |
Hanna Reitz | 7f36a50 | 2022-06-20 18:26:54 +0200 | [diff] [blame] | 171 | # @ImageInfoSpecificFile: |
| 172 | # |
| 173 | # @extent-size-hint: Extent size hint (if available) |
| 174 | # |
| 175 | # Since: 8.0 |
| 176 | ## |
| 177 | { 'struct': 'ImageInfoSpecificFile', |
| 178 | 'data': { |
| 179 | '*extent-size-hint': 'size' |
| 180 | } } |
| 181 | |
| 182 | ## |
Markus Armbruster | 0db4f50 | 2021-09-17 16:31:20 +0200 | [diff] [blame] | 183 | # @ImageInfoSpecificKind: |
| 184 | # |
| 185 | # @luks: Since 2.7 |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 186 | # |
Markus Armbruster | 0db4f50 | 2021-09-17 16:31:20 +0200 | [diff] [blame] | 187 | # @rbd: Since 6.1 |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 188 | # |
Hanna Reitz | 7f36a50 | 2022-06-20 18:26:54 +0200 | [diff] [blame] | 189 | # @file: Since 8.0 |
Markus Armbruster | 0db4f50 | 2021-09-17 16:31:20 +0200 | [diff] [blame] | 190 | # |
| 191 | # Since: 1.7 |
| 192 | ## |
| 193 | { 'enum': 'ImageInfoSpecificKind', |
Hanna Reitz | 7f36a50 | 2022-06-20 18:26:54 +0200 | [diff] [blame] | 194 | 'data': [ 'qcow2', 'vmdk', 'luks', 'rbd', 'file' ] } |
Markus Armbruster | 0db4f50 | 2021-09-17 16:31:20 +0200 | [diff] [blame] | 195 | |
| 196 | ## |
| 197 | # @ImageInfoSpecificQCow2Wrapper: |
| 198 | # |
Markus Armbruster | 2fecccb | 2024-02-05 08:47:06 +0100 | [diff] [blame] | 199 | # @data: image information specific to QCOW2 |
| 200 | # |
Markus Armbruster | 0db4f50 | 2021-09-17 16:31:20 +0200 | [diff] [blame] | 201 | # Since: 1.7 |
| 202 | ## |
| 203 | { 'struct': 'ImageInfoSpecificQCow2Wrapper', |
| 204 | 'data': { 'data': 'ImageInfoSpecificQCow2' } } |
| 205 | |
| 206 | ## |
| 207 | # @ImageInfoSpecificVmdkWrapper: |
| 208 | # |
Markus Armbruster | 2fecccb | 2024-02-05 08:47:06 +0100 | [diff] [blame] | 209 | # @data: image information specific to VMDK |
| 210 | # |
Markus Armbruster | 0db4f50 | 2021-09-17 16:31:20 +0200 | [diff] [blame] | 211 | # Since: 6.1 |
| 212 | ## |
| 213 | { 'struct': 'ImageInfoSpecificVmdkWrapper', |
| 214 | 'data': { 'data': 'ImageInfoSpecificVmdk' } } |
| 215 | |
| 216 | ## |
| 217 | # @ImageInfoSpecificLUKSWrapper: |
| 218 | # |
Markus Armbruster | 2fecccb | 2024-02-05 08:47:06 +0100 | [diff] [blame] | 219 | # @data: image information specific to LUKS |
| 220 | # |
Markus Armbruster | 0db4f50 | 2021-09-17 16:31:20 +0200 | [diff] [blame] | 221 | # Since: 2.7 |
| 222 | ## |
| 223 | { 'struct': 'ImageInfoSpecificLUKSWrapper', |
| 224 | 'data': { 'data': 'QCryptoBlockInfoLUKS' } } |
| 225 | # If we need to add block driver specific parameters for |
| 226 | # LUKS in future, then we'll subclass QCryptoBlockInfoLUKS |
| 227 | # to define a ImageInfoSpecificLUKS |
| 228 | |
| 229 | ## |
| 230 | # @ImageInfoSpecificRbdWrapper: |
| 231 | # |
Markus Armbruster | 2fecccb | 2024-02-05 08:47:06 +0100 | [diff] [blame] | 232 | # @data: image information specific to RBD |
| 233 | # |
Markus Armbruster | 0db4f50 | 2021-09-17 16:31:20 +0200 | [diff] [blame] | 234 | # Since: 6.1 |
| 235 | ## |
| 236 | { 'struct': 'ImageInfoSpecificRbdWrapper', |
| 237 | 'data': { 'data': 'ImageInfoSpecificRbd' } } |
| 238 | |
| 239 | ## |
Hanna Reitz | 7f36a50 | 2022-06-20 18:26:54 +0200 | [diff] [blame] | 240 | # @ImageInfoSpecificFileWrapper: |
| 241 | # |
Markus Armbruster | 2fecccb | 2024-02-05 08:47:06 +0100 | [diff] [blame] | 242 | # @data: image information specific to files |
| 243 | # |
Hanna Reitz | 7f36a50 | 2022-06-20 18:26:54 +0200 | [diff] [blame] | 244 | # Since: 8.0 |
| 245 | ## |
| 246 | { 'struct': 'ImageInfoSpecificFileWrapper', |
| 247 | 'data': { 'data': 'ImageInfoSpecificFile' } } |
| 248 | |
| 249 | ## |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 250 | # @ImageInfoSpecific: |
| 251 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 252 | # A discriminated record of image format specific information |
| 253 | # structures. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 254 | # |
Markus Armbruster | 89a2273 | 2024-02-05 08:47:09 +0100 | [diff] [blame] | 255 | # @type: block driver name |
| 256 | # |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 257 | # Since: 1.7 |
| 258 | ## |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 259 | { 'union': 'ImageInfoSpecific', |
Markus Armbruster | 0db4f50 | 2021-09-17 16:31:20 +0200 | [diff] [blame] | 260 | 'base': { 'type': 'ImageInfoSpecificKind' }, |
| 261 | 'discriminator': 'type', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 262 | 'data': { |
Markus Armbruster | 0db4f50 | 2021-09-17 16:31:20 +0200 | [diff] [blame] | 263 | 'qcow2': 'ImageInfoSpecificQCow2Wrapper', |
| 264 | 'vmdk': 'ImageInfoSpecificVmdkWrapper', |
| 265 | 'luks': 'ImageInfoSpecificLUKSWrapper', |
Hanna Reitz | 7f36a50 | 2022-06-20 18:26:54 +0200 | [diff] [blame] | 266 | 'rbd': 'ImageInfoSpecificRbdWrapper', |
| 267 | 'file': 'ImageInfoSpecificFileWrapper' |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 268 | } } |
| 269 | |
| 270 | ## |
Hanna Reitz | a2085f8 | 2022-06-20 18:26:56 +0200 | [diff] [blame] | 271 | # @BlockNodeInfo: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 272 | # |
| 273 | # Information about a QEMU image file |
| 274 | # |
| 275 | # @filename: name of the image file |
| 276 | # |
| 277 | # @format: format of the image file |
| 278 | # |
| 279 | # @virtual-size: maximum capacity in bytes of the image |
| 280 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 281 | # @actual-size: actual size on disk in bytes of the image |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 282 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 283 | # @dirty-flag: true if image is not cleanly closed |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 284 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 285 | # @cluster-size: size of a cluster in bytes |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 286 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 287 | # @encrypted: true if the image is encrypted |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 288 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 289 | # @compressed: true if the image is compressed (Since 1.7) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 290 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 291 | # @backing-filename: name of the backing file |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 292 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 293 | # @full-backing-filename: full path of the backing file |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 294 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 295 | # @backing-filename-format: the format of the backing file |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 296 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 297 | # @snapshots: list of VM snapshots |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 298 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 299 | # @format-specific: structure supplying additional format-specific |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 300 | # information (since 1.7) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 301 | # |
Hanna Reitz | a2085f8 | 2022-06-20 18:26:56 +0200 | [diff] [blame] | 302 | # Since: 8.0 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 303 | ## |
Hanna Reitz | a2085f8 | 2022-06-20 18:26:56 +0200 | [diff] [blame] | 304 | { 'struct': 'BlockNodeInfo', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 305 | 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool', |
| 306 | '*actual-size': 'int', 'virtual-size': 'int', |
| 307 | '*cluster-size': 'int', '*encrypted': 'bool', '*compressed': 'bool', |
| 308 | '*backing-filename': 'str', '*full-backing-filename': 'str', |
| 309 | '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'], |
Kevin Wolf | 24bf10d | 2014-11-21 17:43:57 +0100 | [diff] [blame] | 310 | '*format-specific': 'ImageInfoSpecific' } } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 311 | |
| 312 | ## |
Hanna Reitz | a2085f8 | 2022-06-20 18:26:56 +0200 | [diff] [blame] | 313 | # @ImageInfo: |
| 314 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 315 | # Information about a QEMU image file, and potentially its backing |
| 316 | # image |
Hanna Reitz | a2085f8 | 2022-06-20 18:26:56 +0200 | [diff] [blame] | 317 | # |
| 318 | # @backing-image: info of the backing image |
| 319 | # |
| 320 | # Since: 1.3 |
| 321 | ## |
| 322 | { 'struct': 'ImageInfo', |
| 323 | 'base': 'BlockNodeInfo', |
| 324 | 'data': { |
| 325 | '*backing-image': 'ImageInfo' |
| 326 | } } |
| 327 | |
| 328 | ## |
Hanna Reitz | 6cab339 | 2022-06-20 18:26:59 +0200 | [diff] [blame] | 329 | # @BlockChildInfo: |
| 330 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 331 | # Information about all nodes in the block graph starting at some |
| 332 | # node, annotated with information about that node in relation to its |
| 333 | # parent. |
Hanna Reitz | 6cab339 | 2022-06-20 18:26:59 +0200 | [diff] [blame] | 334 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 335 | # @name: Child name of the root node in the BlockGraphInfo struct, in |
| 336 | # its role as the child of some undescribed parent node |
Hanna Reitz | 6cab339 | 2022-06-20 18:26:59 +0200 | [diff] [blame] | 337 | # |
| 338 | # @info: Block graph information starting at this node |
| 339 | # |
| 340 | # Since: 8.0 |
| 341 | ## |
| 342 | { 'struct': 'BlockChildInfo', |
| 343 | 'data': { |
| 344 | 'name': 'str', |
| 345 | 'info': 'BlockGraphInfo' |
| 346 | } } |
| 347 | |
| 348 | ## |
| 349 | # @BlockGraphInfo: |
| 350 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 351 | # Information about all nodes in a block (sub)graph in the form of |
| 352 | # BlockNodeInfo data. The base BlockNodeInfo struct contains the |
| 353 | # information for the (sub)graph's root node. |
Hanna Reitz | 6cab339 | 2022-06-20 18:26:59 +0200 | [diff] [blame] | 354 | # |
| 355 | # @children: Array of links to this node's child nodes' information |
| 356 | # |
| 357 | # Since: 8.0 |
| 358 | ## |
| 359 | { 'struct': 'BlockGraphInfo', |
| 360 | 'base': 'BlockNodeInfo', |
| 361 | 'data': { 'children': ['BlockChildInfo'] } } |
| 362 | |
| 363 | ## |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 364 | # @ImageCheck: |
| 365 | # |
| 366 | # Information about a QEMU image file check |
| 367 | # |
| 368 | # @filename: name of the image file checked |
| 369 | # |
| 370 | # @format: format of the image file checked |
| 371 | # |
| 372 | # @check-errors: number of unexpected errors occurred during check |
| 373 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 374 | # @image-end-offset: offset (in bytes) where the image ends, this |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 375 | # field is present if the driver for the image format supports it |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 376 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 377 | # @corruptions: number of corruptions found during the check if any |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 378 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 379 | # @leaks: number of leaks found during the check if any |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 380 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 381 | # @corruptions-fixed: number of corruptions fixed during the check if |
| 382 | # any |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 383 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 384 | # @leaks-fixed: number of leaks fixed during the check if any |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 385 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 386 | # @total-clusters: total number of clusters, this field is present if |
| 387 | # the driver for the image format supports it |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 388 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 389 | # @allocated-clusters: total number of allocated clusters, this field |
| 390 | # is present if the driver for the image format supports it |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 391 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 392 | # @fragmented-clusters: total number of fragmented clusters, this |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 393 | # field is present if the driver for the image format supports it |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 394 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 395 | # @compressed-clusters: total number of compressed clusters, this |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 396 | # field is present if the driver for the image format supports it |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 397 | # |
| 398 | # Since: 1.4 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 399 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 400 | { 'struct': 'ImageCheck', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 401 | 'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int', |
| 402 | '*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int', |
| 403 | '*corruptions-fixed': 'int', '*leaks-fixed': 'int', |
| 404 | '*total-clusters': 'int', '*allocated-clusters': 'int', |
| 405 | '*fragmented-clusters': 'int', '*compressed-clusters': 'int' } } |
| 406 | |
| 407 | ## |
Fam Zheng | 16b0d55 | 2016-01-26 11:59:02 +0800 | [diff] [blame] | 408 | # @MapEntry: |
| 409 | # |
| 410 | # Mapping information from a virtual block range to a host file range |
| 411 | # |
Max Reitz | ffb515f | 2020-11-04 17:55:12 +0100 | [diff] [blame] | 412 | # @start: virtual (guest) offset of the first byte described by this |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 413 | # entry |
Fam Zheng | 16b0d55 | 2016-01-26 11:59:02 +0800 | [diff] [blame] | 414 | # |
| 415 | # @length: the number of bytes of the mapped virtual range |
| 416 | # |
Max Reitz | ffb515f | 2020-11-04 17:55:12 +0100 | [diff] [blame] | 417 | # @data: reading the image will actually read data from a file (in |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 418 | # particular, if @offset is present this means that the sectors |
| 419 | # are not simply preallocated, but contain actual data in raw |
| 420 | # format) |
Fam Zheng | 16b0d55 | 2016-01-26 11:59:02 +0800 | [diff] [blame] | 421 | # |
Max Reitz | ffb515f | 2020-11-04 17:55:12 +0100 | [diff] [blame] | 422 | # @zero: whether the virtual blocks read as zeroes |
Fam Zheng | 16b0d55 | 2016-01-26 11:59:02 +0800 | [diff] [blame] | 423 | # |
Andrey Drobyshev via | 52b10c9 | 2023-09-08 00:02:26 +0300 | [diff] [blame] | 424 | # @compressed: true if the data is stored compressed (since 8.2) |
| 425 | # |
Max Reitz | ffb515f | 2020-11-04 17:55:12 +0100 | [diff] [blame] | 426 | # @depth: number of layers (0 = top image, 1 = top image's backing |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 427 | # file, ..., n - 1 = bottom image (where n is the number of images |
| 428 | # in the chain)) before reaching one for which the range is |
| 429 | # allocated |
Fam Zheng | 16b0d55 | 2016-01-26 11:59:02 +0800 | [diff] [blame] | 430 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 431 | # @present: true if this layer provides the data, false if adding a |
| 432 | # backing layer could impact this region (since 6.1) |
Eric Blake | 8417e13 | 2021-07-01 14:06:55 -0500 | [diff] [blame] | 433 | # |
Max Reitz | ffb515f | 2020-11-04 17:55:12 +0100 | [diff] [blame] | 434 | # @offset: if present, the image file stores the data for this range |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 435 | # in raw format at the given (host) offset |
Fam Zheng | 16b0d55 | 2016-01-26 11:59:02 +0800 | [diff] [blame] | 436 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 437 | # @filename: filename that is referred to by @offset |
Fam Zheng | 16b0d55 | 2016-01-26 11:59:02 +0800 | [diff] [blame] | 438 | # |
| 439 | # Since: 2.6 |
Fam Zheng | 16b0d55 | 2016-01-26 11:59:02 +0800 | [diff] [blame] | 440 | ## |
| 441 | { 'struct': 'MapEntry', |
| 442 | 'data': {'start': 'int', 'length': 'int', 'data': 'bool', |
Andrey Drobyshev via | 52b10c9 | 2023-09-08 00:02:26 +0300 | [diff] [blame] | 443 | 'zero': 'bool', 'compressed': 'bool', 'depth': 'int', |
| 444 | 'present': 'bool', '*offset': 'int', '*filename': 'str' } } |
Fam Zheng | 16b0d55 | 2016-01-26 11:59:02 +0800 | [diff] [blame] | 445 | |
| 446 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 447 | # @BlockdevCacheInfo: |
Kevin Wolf | 9e193c5 | 2014-05-22 13:28:45 +0200 | [diff] [blame] | 448 | # |
| 449 | # Cache mode information for a block device |
| 450 | # |
Andrea Bolognani | c0ac533 | 2022-05-03 09:37:36 +0200 | [diff] [blame] | 451 | # @writeback: true if writeback mode is enabled |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 452 | # |
Andrea Bolognani | c0ac533 | 2022-05-03 09:37:36 +0200 | [diff] [blame] | 453 | # @direct: true if the host page cache is bypassed (O_DIRECT) |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 454 | # |
Andrea Bolognani | c0ac533 | 2022-05-03 09:37:36 +0200 | [diff] [blame] | 455 | # @no-flush: true if flush requests are ignored for the device |
Kevin Wolf | 9e193c5 | 2014-05-22 13:28:45 +0200 | [diff] [blame] | 456 | # |
| 457 | # Since: 2.3 |
| 458 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 459 | { 'struct': 'BlockdevCacheInfo', |
Kevin Wolf | 9e193c5 | 2014-05-22 13:28:45 +0200 | [diff] [blame] | 460 | 'data': { 'writeback': 'bool', |
| 461 | 'direct': 'bool', |
| 462 | 'no-flush': 'bool' } } |
| 463 | |
| 464 | ## |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 465 | # @BlockDeviceInfo: |
| 466 | # |
| 467 | # Information about the backing device for a block device. |
| 468 | # |
| 469 | # @file: the filename of the backing device |
| 470 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 471 | # @node-name: the name of the block driver node (Since 2.0) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 472 | # |
| 473 | # @ro: true if the backing device was open read-only |
| 474 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 475 | # @drv: the name of the block format used to open the backing device. |
| 476 | # As of 0.14 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', |
| 477 | # 'dmg', 'file', 'file', 'ftp', 'ftps', 'host_cdrom', |
| 478 | # 'host_device', 'http', 'https', 'luks', 'nbd', 'parallels', |
| 479 | # 'qcow', 'qcow2', 'raw', 'vdi', 'vmdk', 'vpc', 'vvfat' 2.2: |
| 480 | # 'archipelago' added, 'cow' dropped 2.3: 'host_floppy' deprecated |
| 481 | # 2.5: 'host_floppy' dropped 2.6: 'luks' added 2.8: 'replication' |
| 482 | # added, 'tftp' dropped 2.9: 'archipelago' dropped |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 483 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 484 | # @backing_file: the name of the backing file (for copy-on-write) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 485 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 486 | # @backing_file_depth: number of files in the backing file chain |
| 487 | # (since: 1.2) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 488 | # |
| 489 | # @encrypted: true if the backing device is encrypted |
| 490 | # |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 491 | # @detect_zeroes: detect and optimize zero writes (Since 2.1) |
| 492 | # |
| 493 | # @bps: total throughput limit in bytes per second is specified |
| 494 | # |
| 495 | # @bps_rd: read throughput limit in bytes per second is specified |
| 496 | # |
| 497 | # @bps_wr: write throughput limit in bytes per second is specified |
| 498 | # |
| 499 | # @iops: total I/O operations per second is specified |
| 500 | # |
| 501 | # @iops_rd: read I/O operations per second is specified |
| 502 | # |
| 503 | # @iops_wr: write I/O operations per second is specified |
| 504 | # |
| 505 | # @image: the info of image used (since: 1.6) |
| 506 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 507 | # @bps_max: total throughput limit during bursts, in bytes (Since 1.7) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 508 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 509 | # @bps_rd_max: read throughput limit during bursts, in bytes (Since |
| 510 | # 1.7) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 511 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 512 | # @bps_wr_max: write throughput limit during bursts, in bytes (Since |
| 513 | # 1.7) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 514 | # |
Markus Armbruster | f2de3b9 | 2023-04-25 08:42:17 +0200 | [diff] [blame] | 515 | # @iops_max: total I/O operations per second during bursts, in bytes |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 516 | # (Since 1.7) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 517 | # |
Markus Armbruster | f2de3b9 | 2023-04-25 08:42:17 +0200 | [diff] [blame] | 518 | # @iops_rd_max: read I/O operations per second during bursts, in bytes |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 519 | # (Since 1.7) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 520 | # |
Markus Armbruster | f2de3b9 | 2023-04-25 08:42:17 +0200 | [diff] [blame] | 521 | # @iops_wr_max: write I/O operations per second during bursts, in |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 522 | # bytes (Since 1.7) |
Alberto Garcia | 398befd | 2016-02-18 12:27:04 +0200 | [diff] [blame] | 523 | # |
Markus Armbruster | f2de3b9 | 2023-04-25 08:42:17 +0200 | [diff] [blame] | 524 | # @bps_max_length: maximum length of the @bps_max burst period, in |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 525 | # seconds. (Since 2.6) |
Alberto Garcia | 398befd | 2016-02-18 12:27:04 +0200 | [diff] [blame] | 526 | # |
Markus Armbruster | f2de3b9 | 2023-04-25 08:42:17 +0200 | [diff] [blame] | 527 | # @bps_rd_max_length: maximum length of the @bps_rd_max burst period, |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 528 | # in seconds. (Since 2.6) |
Alberto Garcia | 398befd | 2016-02-18 12:27:04 +0200 | [diff] [blame] | 529 | # |
Markus Armbruster | f2de3b9 | 2023-04-25 08:42:17 +0200 | [diff] [blame] | 530 | # @bps_wr_max_length: maximum length of the @bps_wr_max burst period, |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 531 | # in seconds. (Since 2.6) |
Alberto Garcia | 398befd | 2016-02-18 12:27:04 +0200 | [diff] [blame] | 532 | # |
Markus Armbruster | f2de3b9 | 2023-04-25 08:42:17 +0200 | [diff] [blame] | 533 | # @iops_max_length: maximum length of the @iops burst period, in |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 534 | # seconds. (Since 2.6) |
Alberto Garcia | 398befd | 2016-02-18 12:27:04 +0200 | [diff] [blame] | 535 | # |
Markus Armbruster | f2de3b9 | 2023-04-25 08:42:17 +0200 | [diff] [blame] | 536 | # @iops_rd_max_length: maximum length of the @iops_rd_max burst |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 537 | # period, in seconds. (Since 2.6) |
Alberto Garcia | 398befd | 2016-02-18 12:27:04 +0200 | [diff] [blame] | 538 | # |
Markus Armbruster | f2de3b9 | 2023-04-25 08:42:17 +0200 | [diff] [blame] | 539 | # @iops_wr_max_length: maximum length of the @iops_wr_max burst |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 540 | # period, in seconds. (Since 2.6) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 541 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 542 | # @iops_size: an I/O size in bytes (Since 1.7) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 543 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 544 | # @group: throttle group name (Since 2.4) |
Alberto Garcia | b8fe169 | 2015-06-08 18:17:46 +0200 | [diff] [blame] | 545 | # |
Kevin Wolf | 9e193c5 | 2014-05-22 13:28:45 +0200 | [diff] [blame] | 546 | # @cache: the cache mode used for the block device (since: 2.3) |
| 547 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 548 | # @write_threshold: configured write threshold for the device. 0 if |
| 549 | # disabled. (Since 2.3) |
Francesco Romani | e246211 | 2015-01-12 14:11:13 +0100 | [diff] [blame] | 550 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 551 | # @dirty-bitmaps: dirty bitmaps information (only present if node has |
| 552 | # one or more dirty bitmaps) (Since 4.2) |
Vladimir Sementsov-Ogievskiy | 590a63d | 2019-07-29 16:35:56 -0400 | [diff] [blame] | 553 | # |
Markus Armbruster | 9bc6e89 | 2020-11-18 07:41:58 +0100 | [diff] [blame] | 554 | # Since: 0.14 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 555 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 556 | { 'struct': 'BlockDeviceInfo', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 557 | 'data': { 'file': 'str', '*node-name': 'str', 'ro': 'bool', 'drv': 'str', |
| 558 | '*backing_file': 'str', 'backing_file_depth': 'int', |
Markus Armbruster | df4097a | 2020-03-17 12:54:51 +0100 | [diff] [blame] | 559 | 'encrypted': 'bool', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 560 | 'detect_zeroes': 'BlockdevDetectZeroesOptions', |
| 561 | 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int', |
| 562 | 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int', |
| 563 | 'image': 'ImageInfo', |
| 564 | '*bps_max': 'int', '*bps_rd_max': 'int', |
| 565 | '*bps_wr_max': 'int', '*iops_max': 'int', |
| 566 | '*iops_rd_max': 'int', '*iops_wr_max': 'int', |
Alberto Garcia | 398befd | 2016-02-18 12:27:04 +0200 | [diff] [blame] | 567 | '*bps_max_length': 'int', '*bps_rd_max_length': 'int', |
| 568 | '*bps_wr_max_length': 'int', '*iops_max_length': 'int', |
| 569 | '*iops_rd_max_length': 'int', '*iops_wr_max_length': 'int', |
Alberto Garcia | b8fe169 | 2015-06-08 18:17:46 +0200 | [diff] [blame] | 570 | '*iops_size': 'int', '*group': 'str', 'cache': 'BlockdevCacheInfo', |
Vladimir Sementsov-Ogievskiy | 590a63d | 2019-07-29 16:35:56 -0400 | [diff] [blame] | 571 | 'write_threshold': 'int', '*dirty-bitmaps': ['BlockDirtyInfo'] } } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 572 | |
| 573 | ## |
| 574 | # @BlockDeviceIoStatus: |
| 575 | # |
| 576 | # An enumeration of block device I/O status. |
| 577 | # |
| 578 | # @ok: The last I/O operation has succeeded |
| 579 | # |
| 580 | # @failed: The last I/O operation has failed |
| 581 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 582 | # @nospace: The last I/O operation has failed due to a no-space |
| 583 | # condition |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 584 | # |
| 585 | # Since: 1.0 |
| 586 | ## |
| 587 | { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] } |
| 588 | |
| 589 | ## |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 590 | # @BlockDirtyInfo: |
| 591 | # |
| 592 | # Block dirty bitmap information. |
| 593 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 594 | # @name: the name of the dirty bitmap (Since 2.4) |
Fam Zheng | 0db6e54 | 2015-04-17 19:49:50 -0400 | [diff] [blame] | 595 | # |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 596 | # @count: number of dirty bytes according to the dirty bitmap |
| 597 | # |
| 598 | # @granularity: granularity of the dirty bitmap in bytes (since 1.4) |
| 599 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 600 | # @recording: true if the bitmap is recording new writes from the |
| 601 | # guest. (since 4.0) |
John Snow | 4db6ceb | 2019-03-12 12:05:48 -0400 | [diff] [blame] | 602 | # |
| 603 | # @busy: true if the bitmap is in-use by some operation (NBD or jobs) |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 604 | # and cannot be modified via QMP or used by another operation. |
| 605 | # (since 4.0) |
John Snow | a113534 | 2015-04-17 19:50:00 -0400 | [diff] [blame] | 606 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 607 | # @persistent: true if the bitmap was stored on disk, is scheduled to |
| 608 | # be stored on disk, or both. (since 4.0) |
John Snow | b0f4555 | 2019-03-12 12:05:49 -0400 | [diff] [blame] | 609 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 610 | # @inconsistent: true if this is a persistent bitmap that was |
| 611 | # improperly stored. Implies @persistent to be true; @recording |
| 612 | # and @busy to be false. This bitmap cannot be used. To remove |
| 613 | # it, use @block-dirty-bitmap-remove. (Since 4.0) |
Eric Blake | f67cf66 | 2019-02-19 17:49:43 -0500 | [diff] [blame] | 614 | # |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 615 | # Since: 1.3 |
| 616 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 617 | { 'struct': 'BlockDirtyInfo', |
John Snow | a113534 | 2015-04-17 19:50:00 -0400 | [diff] [blame] | 618 | 'data': {'*name': 'str', 'count': 'int', 'granularity': 'uint32', |
Markus Armbruster | df4097a | 2020-03-17 12:54:51 +0100 | [diff] [blame] | 619 | 'recording': 'bool', 'busy': 'bool', |
John Snow | b0f4555 | 2019-03-12 12:05:49 -0400 | [diff] [blame] | 620 | 'persistent': 'bool', '*inconsistent': 'bool' } } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 621 | |
| 622 | ## |
Andrey Shinkevich | b8968c8 | 2019-02-08 18:06:07 +0300 | [diff] [blame] | 623 | # @Qcow2BitmapInfoFlags: |
| 624 | # |
| 625 | # An enumeration of flags that a bitmap can report to the user. |
| 626 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 627 | # @in-use: This flag is set by any process actively modifying the |
| 628 | # qcow2 file, and cleared when the updated bitmap is flushed to |
| 629 | # the qcow2 image. The presence of this flag in an offline image |
| 630 | # means that the bitmap was not saved correctly after its last |
| 631 | # usage, and may contain inconsistent data. |
Andrey Shinkevich | b8968c8 | 2019-02-08 18:06:07 +0300 | [diff] [blame] | 632 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 633 | # @auto: The bitmap must reflect all changes of the virtual disk by |
| 634 | # any application that would write to this qcow2 file. |
Andrey Shinkevich | b8968c8 | 2019-02-08 18:06:07 +0300 | [diff] [blame] | 635 | # |
| 636 | # Since: 4.0 |
| 637 | ## |
| 638 | { 'enum': 'Qcow2BitmapInfoFlags', |
| 639 | 'data': ['in-use', 'auto'] } |
| 640 | |
| 641 | ## |
| 642 | # @Qcow2BitmapInfo: |
| 643 | # |
| 644 | # Qcow2 bitmap information. |
| 645 | # |
| 646 | # @name: the name of the bitmap |
| 647 | # |
| 648 | # @granularity: granularity of the bitmap in bytes |
| 649 | # |
| 650 | # @flags: flags of the bitmap |
| 651 | # |
| 652 | # Since: 4.0 |
| 653 | ## |
| 654 | { 'struct': 'Qcow2BitmapInfo', |
| 655 | 'data': {'name': 'str', 'granularity': 'uint32', |
| 656 | 'flags': ['Qcow2BitmapInfoFlags'] } } |
| 657 | |
| 658 | ## |
Vladimir Sementsov-Ogievskiy | 7e5c776 | 2018-03-09 19:52:12 +0300 | [diff] [blame] | 659 | # @BlockLatencyHistogramInfo: |
| 660 | # |
| 661 | # Block latency histogram. |
| 662 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 663 | # @boundaries: list of interval boundary values in nanoseconds, all |
| 664 | # greater than zero and in ascending order. For example, the list |
| 665 | # [10, 50, 100] produces the following histogram intervals: [0, |
| 666 | # 10), [10, 50), [50, 100), [100, +inf). |
Vladimir Sementsov-Ogievskiy | 7e5c776 | 2018-03-09 19:52:12 +0300 | [diff] [blame] | 667 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 668 | # @bins: list of io request counts corresponding to histogram |
Markus Armbruster | dad3c95 | 2023-07-20 09:16:04 +0200 | [diff] [blame] | 669 | # intervals, one more element than @boundaries has. For the |
| 670 | # example above, @bins may be something like [3, 1, 5, 2], and |
Markus Armbruster | d988487 | 2024-02-05 08:46:57 +0100 | [diff] [blame] | 671 | # corresponding histogram looks like:: |
Peter Maydell | a0fcff3 | 2020-09-25 17:23:05 +0100 | [diff] [blame] | 672 | # |
| 673 | # 5| * |
| 674 | # 4| * |
| 675 | # 3| * * |
| 676 | # 2| * * * |
| 677 | # 1| * * * * |
| 678 | # +------------------ |
| 679 | # 10 50 100 |
Vladimir Sementsov-Ogievskiy | 7e5c776 | 2018-03-09 19:52:12 +0300 | [diff] [blame] | 680 | # |
Vladimir Sementsov-Ogievskiy | cb8aac3 | 2019-03-05 15:53:17 +0300 | [diff] [blame] | 681 | # Since: 4.0 |
Vladimir Sementsov-Ogievskiy | 7e5c776 | 2018-03-09 19:52:12 +0300 | [diff] [blame] | 682 | ## |
| 683 | { 'struct': 'BlockLatencyHistogramInfo', |
| 684 | 'data': {'boundaries': ['uint64'], 'bins': ['uint64'] } } |
| 685 | |
| 686 | ## |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 687 | # @BlockInfo: |
| 688 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 689 | # Block device information. This structure describes a virtual device |
| 690 | # and the backing device associated with it. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 691 | # |
| 692 | # @device: The device name associated with the virtual device. |
| 693 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 694 | # @qdev: The qdev ID, or if no ID is assigned, the QOM path of the |
| 695 | # block device. (since 2.10) |
Kevin Wolf | 46eade7 | 2017-07-11 13:27:38 +0200 | [diff] [blame] | 696 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 697 | # @type: This field is returned only for compatibility reasons, it |
| 698 | # should not be used (always returns 'unknown') |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 699 | # |
| 700 | # @removable: True if the device supports removable media. |
| 701 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 702 | # @locked: True if the guest has locked this device from having its |
| 703 | # media removed |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 704 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 705 | # @tray_open: True if the device's tray is open (only present if it |
| 706 | # has a tray) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 707 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 708 | # @io-status: @BlockDeviceIoStatus. Only present if the device |
| 709 | # supports it and the VM is configured to stop on errors |
| 710 | # (supported device models: virtio-blk, IDE, SCSI except |
| 711 | # scsi-generic) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 712 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 713 | # @inserted: @BlockDeviceInfo describing the device if media is |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 714 | # present |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 715 | # |
Andrea Bolognani | 23e4645 | 2022-05-03 09:37:35 +0200 | [diff] [blame] | 716 | # Since: 0.14 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 717 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 718 | { 'struct': 'BlockInfo', |
Kevin Wolf | 46eade7 | 2017-07-11 13:27:38 +0200 | [diff] [blame] | 719 | 'data': {'device': 'str', '*qdev': 'str', 'type': 'str', 'removable': 'bool', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 720 | 'locked': 'bool', '*inserted': 'BlockDeviceInfo', |
Daniel P. Berrangé | e67d8e2 | 2021-02-19 19:22:36 +0000 | [diff] [blame] | 721 | '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus' } } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 722 | |
| 723 | ## |
Stefan Hajnoczi | 90880ff | 2017-07-05 13:57:30 +0100 | [diff] [blame] | 724 | # @BlockMeasureInfo: |
| 725 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 726 | # Image file size calculation information. This structure describes |
| 727 | # the size requirements for creating a new image file. |
Stefan Hajnoczi | 90880ff | 2017-07-05 13:57:30 +0100 | [diff] [blame] | 728 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 729 | # The size requirements depend on the new image file format. File |
| 730 | # size always equals virtual disk size for the 'raw' format, even for |
| 731 | # sparse POSIX files. Compact formats such as 'qcow2' represent |
| 732 | # unallocated and zero regions efficiently so file size may be smaller |
| 733 | # than virtual disk size. |
Stefan Hajnoczi | 90880ff | 2017-07-05 13:57:30 +0100 | [diff] [blame] | 734 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 735 | # The values are upper bounds that are guaranteed to fit the new image |
| 736 | # file. Subsequent modification, such as internal snapshot or further |
| 737 | # bitmap creation, may require additional space and is not covered |
| 738 | # here. |
Stefan Hajnoczi | 90880ff | 2017-07-05 13:57:30 +0100 | [diff] [blame] | 739 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 740 | # @required: Size required for a new image file, in bytes, when |
| 741 | # copying just allocated guest-visible contents. |
Stefan Hajnoczi | 90880ff | 2017-07-05 13:57:30 +0100 | [diff] [blame] | 742 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 743 | # @fully-allocated: Image file size, in bytes, once data has been |
| 744 | # written to all sectors, when copying just guest-visible |
| 745 | # contents. |
Eric Blake | 5d72c68 | 2020-05-21 14:21:34 -0500 | [diff] [blame] | 746 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 747 | # @bitmaps: Additional size required if all the top-level bitmap |
| 748 | # metadata in the source image were to be copied to the |
| 749 | # destination, present only when source and destination both |
| 750 | # support persistent bitmaps. (since 5.1) |
Stefan Hajnoczi | 90880ff | 2017-07-05 13:57:30 +0100 | [diff] [blame] | 751 | # |
| 752 | # Since: 2.10 |
| 753 | ## |
| 754 | { 'struct': 'BlockMeasureInfo', |
Eric Blake | 5d72c68 | 2020-05-21 14:21:34 -0500 | [diff] [blame] | 755 | 'data': {'required': 'int', 'fully-allocated': 'int', '*bitmaps': 'int'} } |
Stefan Hajnoczi | 90880ff | 2017-07-05 13:57:30 +0100 | [diff] [blame] | 756 | |
| 757 | ## |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 758 | # @query-block: |
| 759 | # |
| 760 | # Get a list of BlockInfo for all virtual block devices. |
| 761 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 762 | # Returns: a list of @BlockInfo describing each virtual block device. |
| 763 | # Filter nodes that were created implicitly are skipped over. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 764 | # |
Markus Armbruster | 9bc6e89 | 2020-11-18 07:41:58 +0100 | [diff] [blame] | 765 | # Since: 0.14 |
Marc-André Lureau | 978ccea | 2016-06-23 13:58:48 +0200 | [diff] [blame] | 766 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 767 | # .. qmp-example:: |
Marc-André Lureau | 978ccea | 2016-06-23 13:58:48 +0200 | [diff] [blame] | 768 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 769 | # -> { "execute": "query-block" } |
| 770 | # <- { |
| 771 | # "return":[ |
| 772 | # { |
| 773 | # "io-status": "ok", |
| 774 | # "device":"ide0-hd0", |
| 775 | # "locked":false, |
| 776 | # "removable":false, |
| 777 | # "inserted":{ |
| 778 | # "ro":false, |
| 779 | # "drv":"qcow2", |
| 780 | # "encrypted":false, |
| 781 | # "file":"disks/test.qcow2", |
| 782 | # "backing_file_depth":1, |
| 783 | # "bps":1000000, |
| 784 | # "bps_rd":0, |
| 785 | # "bps_wr":0, |
| 786 | # "iops":1000000, |
| 787 | # "iops_rd":0, |
| 788 | # "iops_wr":0, |
| 789 | # "bps_max": 8000000, |
| 790 | # "bps_rd_max": 0, |
| 791 | # "bps_wr_max": 0, |
| 792 | # "iops_max": 0, |
| 793 | # "iops_rd_max": 0, |
| 794 | # "iops_wr_max": 0, |
| 795 | # "iops_size": 0, |
| 796 | # "detect_zeroes": "on", |
| 797 | # "write_threshold": 0, |
| 798 | # "image":{ |
| 799 | # "filename":"disks/test.qcow2", |
Marc-André Lureau | 978ccea | 2016-06-23 13:58:48 +0200 | [diff] [blame] | 800 | # "format":"qcow2", |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 801 | # "virtual-size":2048000, |
| 802 | # "backing_file":"base.qcow2", |
| 803 | # "full-backing-filename":"disks/base.qcow2", |
| 804 | # "backing-filename-format":"qcow2", |
| 805 | # "snapshots":[ |
| 806 | # { |
| 807 | # "id": "1", |
| 808 | # "name": "snapshot1", |
| 809 | # "vm-state-size": 0, |
| 810 | # "date-sec": 10000200, |
| 811 | # "date-nsec": 12, |
| 812 | # "vm-clock-sec": 206, |
| 813 | # "vm-clock-nsec": 30 |
| 814 | # } |
| 815 | # ], |
| 816 | # "backing-image":{ |
| 817 | # "filename":"disks/base.qcow2", |
| 818 | # "format":"qcow2", |
| 819 | # "virtual-size":2048000 |
| 820 | # } |
| 821 | # } |
| 822 | # }, |
| 823 | # "qdev": "ide_disk", |
| 824 | # "type":"unknown" |
| 825 | # }, |
| 826 | # { |
| 827 | # "io-status": "ok", |
| 828 | # "device":"ide1-cd0", |
| 829 | # "locked":false, |
| 830 | # "removable":true, |
| 831 | # "qdev": "/machine/unattached/device[23]", |
| 832 | # "tray_open": false, |
| 833 | # "type":"unknown" |
| 834 | # }, |
| 835 | # { |
| 836 | # "device":"floppy0", |
| 837 | # "locked":false, |
| 838 | # "removable":true, |
| 839 | # "qdev": "/machine/unattached/device[20]", |
| 840 | # "type":"unknown" |
| 841 | # }, |
| 842 | # { |
| 843 | # "device":"sd0", |
| 844 | # "locked":false, |
| 845 | # "removable":true, |
| 846 | # "type":"unknown" |
| 847 | # } |
| 848 | # ] |
| 849 | # } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 850 | ## |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 851 | { 'command': 'query-block', 'returns': ['BlockInfo'], |
| 852 | 'allow-preconfig': true } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 853 | |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 854 | ## |
| 855 | # @BlockDeviceTimedStats: |
| 856 | # |
| 857 | # Statistics of a block device during a given interval of time. |
| 858 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 859 | # @interval_length: Interval used for calculating the statistics, in |
| 860 | # seconds. |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 861 | # |
| 862 | # @min_rd_latency_ns: Minimum latency of read operations in the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 863 | # defined interval, in nanoseconds. |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 864 | # |
| 865 | # @min_wr_latency_ns: Minimum latency of write operations in the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 866 | # defined interval, in nanoseconds. |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 867 | # |
Markus Armbruster | 9e27207 | 2023-07-20 09:16:09 +0200 | [diff] [blame] | 868 | # @min_zone_append_latency_ns: Minimum latency of zone append |
| 869 | # operations in the defined interval, in nanoseconds (since 8.1) |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 870 | # |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 871 | # @min_flush_latency_ns: Minimum latency of flush operations in the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 872 | # defined interval, in nanoseconds. |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 873 | # |
| 874 | # @max_rd_latency_ns: Maximum latency of read operations in the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 875 | # defined interval, in nanoseconds. |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 876 | # |
| 877 | # @max_wr_latency_ns: Maximum latency of write operations in the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 878 | # defined interval, in nanoseconds. |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 879 | # |
Markus Armbruster | 9e27207 | 2023-07-20 09:16:09 +0200 | [diff] [blame] | 880 | # @max_zone_append_latency_ns: Maximum latency of zone append |
| 881 | # operations in the defined interval, in nanoseconds (since 8.1) |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 882 | # |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 883 | # @max_flush_latency_ns: Maximum latency of flush operations in the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 884 | # defined interval, in nanoseconds. |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 885 | # |
| 886 | # @avg_rd_latency_ns: Average latency of read operations in the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 887 | # defined interval, in nanoseconds. |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 888 | # |
| 889 | # @avg_wr_latency_ns: Average latency of write operations in the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 890 | # defined interval, in nanoseconds. |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 891 | # |
Markus Armbruster | 9e27207 | 2023-07-20 09:16:09 +0200 | [diff] [blame] | 892 | # @avg_zone_append_latency_ns: Average latency of zone append |
| 893 | # operations in the defined interval, in nanoseconds (since 8.1) |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 894 | # |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 895 | # @avg_flush_latency_ns: Average latency of flush operations in the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 896 | # defined interval, in nanoseconds. |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 897 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 898 | # @avg_rd_queue_depth: Average number of pending read operations in |
| 899 | # the defined interval. |
Alberto Garcia | 96e4ded | 2015-10-28 17:33:06 +0200 | [diff] [blame] | 900 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 901 | # @avg_wr_queue_depth: Average number of pending write operations in |
| 902 | # the defined interval. |
Alberto Garcia | 96e4ded | 2015-10-28 17:33:06 +0200 | [diff] [blame] | 903 | # |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 904 | # @avg_zone_append_queue_depth: Average number of pending zone append |
Markus Armbruster | 9e27207 | 2023-07-20 09:16:09 +0200 | [diff] [blame] | 905 | # operations in the defined interval (since 8.1). |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 906 | # |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 907 | # Since: 2.5 |
| 908 | ## |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 909 | { 'struct': 'BlockDeviceTimedStats', |
| 910 | 'data': { 'interval_length': 'int', 'min_rd_latency_ns': 'int', |
| 911 | 'max_rd_latency_ns': 'int', 'avg_rd_latency_ns': 'int', |
| 912 | 'min_wr_latency_ns': 'int', 'max_wr_latency_ns': 'int', |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 913 | 'avg_wr_latency_ns': 'int', 'min_zone_append_latency_ns': 'int', |
| 914 | 'max_zone_append_latency_ns': 'int', |
| 915 | 'avg_zone_append_latency_ns': 'int', |
| 916 | 'min_flush_latency_ns': 'int', 'max_flush_latency_ns': 'int', |
| 917 | 'avg_flush_latency_ns': 'int', 'avg_rd_queue_depth': 'number', |
| 918 | 'avg_wr_queue_depth': 'number', |
| 919 | 'avg_zone_append_queue_depth': 'number' } } |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 920 | |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 921 | ## |
| 922 | # @BlockDeviceStats: |
| 923 | # |
| 924 | # Statistics of a virtual block device or a block backing device. |
| 925 | # |
Andrea Bolognani | 23e4645 | 2022-05-03 09:37:35 +0200 | [diff] [blame] | 926 | # @rd_bytes: The number of bytes read by the device. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 927 | # |
Andrea Bolognani | 23e4645 | 2022-05-03 09:37:35 +0200 | [diff] [blame] | 928 | # @wr_bytes: The number of bytes written by the device. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 929 | # |
Markus Armbruster | 9e27207 | 2023-07-20 09:16:09 +0200 | [diff] [blame] | 930 | # @zone_append_bytes: The number of bytes appended by the zoned |
| 931 | # devices (since 8.1) |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 932 | # |
Anton Nefedov | 159f85d | 2019-09-23 15:17:30 +0300 | [diff] [blame] | 933 | # @unmap_bytes: The number of bytes unmapped by the device (Since 4.2) |
| 934 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 935 | # @rd_operations: The number of read operations performed by the |
| 936 | # device. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 937 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 938 | # @wr_operations: The number of write operations performed by the |
| 939 | # device. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 940 | # |
Markus Armbruster | 9e27207 | 2023-07-20 09:16:09 +0200 | [diff] [blame] | 941 | # @zone_append_operations: The number of zone append operations |
| 942 | # performed by the zoned devices (since 8.1) |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 943 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 944 | # @flush_operations: The number of cache flush operations performed by |
| 945 | # the device (since 0.15) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 946 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 947 | # @unmap_operations: The number of unmap operations performed by the |
| 948 | # device (Since 4.2) |
Anton Nefedov | 159f85d | 2019-09-23 15:17:30 +0300 | [diff] [blame] | 949 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 950 | # @rd_total_time_ns: Total time spent on reads in nanoseconds (since |
| 951 | # 0.15). |
Anton Nefedov | 329d27e | 2019-09-23 15:17:29 +0300 | [diff] [blame] | 952 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 953 | # @wr_total_time_ns: Total time spent on writes in nanoseconds (since |
| 954 | # 0.15). |
Anton Nefedov | 329d27e | 2019-09-23 15:17:29 +0300 | [diff] [blame] | 955 | # |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 956 | # @zone_append_total_time_ns: Total time spent on zone append writes |
Markus Armbruster | 9e27207 | 2023-07-20 09:16:09 +0200 | [diff] [blame] | 957 | # in nanoseconds (since 8.1) |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 958 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 959 | # @flush_total_time_ns: Total time spent on cache flushes in |
| 960 | # nanoseconds (since 0.15). |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 961 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 962 | # @unmap_total_time_ns: Total time spent on unmap operations in |
| 963 | # nanoseconds (Since 4.2) |
Anton Nefedov | 159f85d | 2019-09-23 15:17:30 +0300 | [diff] [blame] | 964 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 965 | # @wr_highest_offset: The offset after the greatest byte written to |
| 966 | # the device. The intended use of this information is for |
| 967 | # growable sparse files (like qcow2) that are used on top of a |
| 968 | # physical device. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 969 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 970 | # @rd_merged: Number of read requests that have been merged into |
| 971 | # another request (Since 2.3). |
Peter Lieven | f4564d5 | 2015-02-02 14:52:18 +0100 | [diff] [blame] | 972 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 973 | # @wr_merged: Number of write requests that have been merged into |
| 974 | # another request (Since 2.3). |
Peter Lieven | f4564d5 | 2015-02-02 14:52:18 +0100 | [diff] [blame] | 975 | # |
Markus Armbruster | 9e27207 | 2023-07-20 09:16:09 +0200 | [diff] [blame] | 976 | # @zone_append_merged: Number of zone append requests that have been |
| 977 | # merged into another request (since 8.1) |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 978 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 979 | # @unmap_merged: Number of unmap requests that have been merged into |
| 980 | # another request (Since 4.2) |
Anton Nefedov | 159f85d | 2019-09-23 15:17:30 +0300 | [diff] [blame] | 981 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 982 | # @idle_time_ns: Time since the last I/O operation, in nanoseconds. |
| 983 | # If the field is absent it means that there haven't been any |
| 984 | # operations yet (Since 2.5). |
Alberto Garcia | cb38fff | 2015-10-28 17:33:02 +0200 | [diff] [blame] | 985 | # |
Alberto Garcia | 7ee12da | 2015-10-28 17:33:03 +0200 | [diff] [blame] | 986 | # @failed_rd_operations: The number of failed read operations |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 987 | # performed by the device (Since 2.5) |
Alberto Garcia | 7ee12da | 2015-10-28 17:33:03 +0200 | [diff] [blame] | 988 | # |
| 989 | # @failed_wr_operations: The number of failed write operations |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 990 | # performed by the device (Since 2.5) |
Alberto Garcia | 7ee12da | 2015-10-28 17:33:03 +0200 | [diff] [blame] | 991 | # |
Markus Armbruster | 9e27207 | 2023-07-20 09:16:09 +0200 | [diff] [blame] | 992 | # @failed_zone_append_operations: The number of failed zone append |
| 993 | # write operations performed by the zoned devices (since 8.1) |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 994 | # |
Alberto Garcia | 7ee12da | 2015-10-28 17:33:03 +0200 | [diff] [blame] | 995 | # @failed_flush_operations: The number of failed flush operations |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 996 | # performed by the device (Since 2.5) |
Alberto Garcia | 7ee12da | 2015-10-28 17:33:03 +0200 | [diff] [blame] | 997 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 998 | # @failed_unmap_operations: The number of failed unmap operations |
| 999 | # performed by the device (Since 4.2) |
Anton Nefedov | 159f85d | 2019-09-23 15:17:30 +0300 | [diff] [blame] | 1000 | # |
Alberto Garcia | 7ee12da | 2015-10-28 17:33:03 +0200 | [diff] [blame] | 1001 | # @invalid_rd_operations: The number of invalid read operations |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1002 | # performed by the device (Since 2.5) |
Alberto Garcia | 7ee12da | 2015-10-28 17:33:03 +0200 | [diff] [blame] | 1003 | # |
| 1004 | # @invalid_wr_operations: The number of invalid write operations |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1005 | # performed by the device (Since 2.5) |
Alberto Garcia | 7ee12da | 2015-10-28 17:33:03 +0200 | [diff] [blame] | 1006 | # |
Markus Armbruster | 9e27207 | 2023-07-20 09:16:09 +0200 | [diff] [blame] | 1007 | # @invalid_zone_append_operations: The number of invalid zone append |
| 1008 | # operations performed by the zoned device (since 8.1) |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 1009 | # |
Alberto Garcia | 7ee12da | 2015-10-28 17:33:03 +0200 | [diff] [blame] | 1010 | # @invalid_flush_operations: The number of invalid flush operations |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1011 | # performed by the device (Since 2.5) |
Alberto Garcia | 7ee12da | 2015-10-28 17:33:03 +0200 | [diff] [blame] | 1012 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1013 | # @invalid_unmap_operations: The number of invalid unmap operations |
| 1014 | # performed by the device (Since 4.2) |
Anton Nefedov | 159f85d | 2019-09-23 15:17:30 +0300 | [diff] [blame] | 1015 | # |
Alberto Garcia | 362e929 | 2015-10-28 17:33:04 +0200 | [diff] [blame] | 1016 | # @account_invalid: Whether invalid operations are included in the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1017 | # last access statistics (Since 2.5) |
Alberto Garcia | 362e929 | 2015-10-28 17:33:04 +0200 | [diff] [blame] | 1018 | # |
| 1019 | # @account_failed: Whether failed operations are included in the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1020 | # latency and last access statistics (Since 2.5) |
Alberto Garcia | 362e929 | 2015-10-28 17:33:04 +0200 | [diff] [blame] | 1021 | # |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 1022 | # @timed_stats: Statistics specific to the set of previously defined |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1023 | # intervals of time (Since 2.5) |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 1024 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1025 | # @rd_latency_histogram: @BlockLatencyHistogramInfo. (Since 4.0) |
Vladimir Sementsov-Ogievskiy | 7e5c776 | 2018-03-09 19:52:12 +0300 | [diff] [blame] | 1026 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1027 | # @wr_latency_histogram: @BlockLatencyHistogramInfo. (Since 4.0) |
Vladimir Sementsov-Ogievskiy | 7e5c776 | 2018-03-09 19:52:12 +0300 | [diff] [blame] | 1028 | # |
Markus Armbruster | 9e27207 | 2023-07-20 09:16:09 +0200 | [diff] [blame] | 1029 | # @zone_append_latency_histogram: @BlockLatencyHistogramInfo. |
| 1030 | # (since 8.1) |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 1031 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1032 | # @flush_latency_histogram: @BlockLatencyHistogramInfo. (Since 4.0) |
Vladimir Sementsov-Ogievskiy | 7e5c776 | 2018-03-09 19:52:12 +0300 | [diff] [blame] | 1033 | # |
Markus Armbruster | 9bc6e89 | 2020-11-18 07:41:58 +0100 | [diff] [blame] | 1034 | # Since: 0.14 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1035 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 1036 | { 'struct': 'BlockDeviceStats', |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 1037 | 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'zone_append_bytes': 'int', |
| 1038 | 'unmap_bytes' : 'int', 'rd_operations': 'int', |
| 1039 | 'wr_operations': 'int', 'zone_append_operations': 'int', |
Anton Nefedov | 159f85d | 2019-09-23 15:17:30 +0300 | [diff] [blame] | 1040 | 'flush_operations': 'int', 'unmap_operations': 'int', |
Anton Nefedov | 329d27e | 2019-09-23 15:17:29 +0300 | [diff] [blame] | 1041 | 'rd_total_time_ns': 'int', 'wr_total_time_ns': 'int', |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 1042 | 'zone_append_total_time_ns': 'int', 'flush_total_time_ns': 'int', |
| 1043 | 'unmap_total_time_ns': 'int', 'wr_highest_offset': 'int', |
| 1044 | 'rd_merged': 'int', 'wr_merged': 'int', 'zone_append_merged': 'int', |
| 1045 | 'unmap_merged': 'int', '*idle_time_ns': 'int', |
Alberto Garcia | 7ee12da | 2015-10-28 17:33:03 +0200 | [diff] [blame] | 1046 | 'failed_rd_operations': 'int', 'failed_wr_operations': 'int', |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 1047 | 'failed_zone_append_operations': 'int', |
| 1048 | 'failed_flush_operations': 'int', |
| 1049 | 'failed_unmap_operations': 'int', 'invalid_rd_operations': 'int', |
| 1050 | 'invalid_wr_operations': 'int', |
| 1051 | 'invalid_zone_append_operations': 'int', |
Anton Nefedov | 159f85d | 2019-09-23 15:17:30 +0300 | [diff] [blame] | 1052 | 'invalid_flush_operations': 'int', 'invalid_unmap_operations': 'int', |
Alberto Garcia | 979e9b0 | 2015-10-28 17:33:05 +0200 | [diff] [blame] | 1053 | 'account_invalid': 'bool', 'account_failed': 'bool', |
Vladimir Sementsov-Ogievskiy | 7e5c776 | 2018-03-09 19:52:12 +0300 | [diff] [blame] | 1054 | 'timed_stats': ['BlockDeviceTimedStats'], |
Vladimir Sementsov-Ogievskiy | cb8aac3 | 2019-03-05 15:53:17 +0300 | [diff] [blame] | 1055 | '*rd_latency_histogram': 'BlockLatencyHistogramInfo', |
| 1056 | '*wr_latency_histogram': 'BlockLatencyHistogramInfo', |
Sam Li | 52eb76f | 2023-05-08 13:19:14 +0800 | [diff] [blame] | 1057 | '*zone_append_latency_histogram': 'BlockLatencyHistogramInfo', |
Vladimir Sementsov-Ogievskiy | cb8aac3 | 2019-03-05 15:53:17 +0300 | [diff] [blame] | 1058 | '*flush_latency_histogram': 'BlockLatencyHistogramInfo' } } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1059 | |
| 1060 | ## |
Anton Nefedov | d924559 | 2019-09-23 15:17:37 +0300 | [diff] [blame] | 1061 | # @BlockStatsSpecificFile: |
| 1062 | # |
| 1063 | # File driver statistics |
| 1064 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1065 | # @discard-nb-ok: The number of successful discard operations |
| 1066 | # performed by the driver. |
Anton Nefedov | d924559 | 2019-09-23 15:17:37 +0300 | [diff] [blame] | 1067 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1068 | # @discard-nb-failed: The number of failed discard operations |
| 1069 | # performed by the driver. |
Anton Nefedov | d924559 | 2019-09-23 15:17:37 +0300 | [diff] [blame] | 1070 | # |
| 1071 | # @discard-bytes-ok: The number of bytes discarded by the driver. |
| 1072 | # |
| 1073 | # Since: 4.2 |
| 1074 | ## |
| 1075 | { 'struct': 'BlockStatsSpecificFile', |
| 1076 | 'data': { |
| 1077 | 'discard-nb-ok': 'uint64', |
| 1078 | 'discard-nb-failed': 'uint64', |
| 1079 | 'discard-bytes-ok': 'uint64' } } |
| 1080 | |
| 1081 | ## |
Philippe Mathieu-Daudé | f25e7ab | 2020-10-01 18:29:39 +0200 | [diff] [blame] | 1082 | # @BlockStatsSpecificNvme: |
| 1083 | # |
| 1084 | # NVMe driver statistics |
| 1085 | # |
| 1086 | # @completion-errors: The number of completion errors. |
| 1087 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1088 | # @aligned-accesses: The number of aligned accesses performed by the |
| 1089 | # driver. |
Philippe Mathieu-Daudé | f25e7ab | 2020-10-01 18:29:39 +0200 | [diff] [blame] | 1090 | # |
| 1091 | # @unaligned-accesses: The number of unaligned accesses performed by |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1092 | # the driver. |
Philippe Mathieu-Daudé | f25e7ab | 2020-10-01 18:29:39 +0200 | [diff] [blame] | 1093 | # |
| 1094 | # Since: 5.2 |
| 1095 | ## |
| 1096 | { 'struct': 'BlockStatsSpecificNvme', |
| 1097 | 'data': { |
| 1098 | 'completion-errors': 'uint64', |
| 1099 | 'aligned-accesses': 'uint64', |
| 1100 | 'unaligned-accesses': 'uint64' } } |
| 1101 | |
| 1102 | ## |
Anton Nefedov | d924559 | 2019-09-23 15:17:37 +0300 | [diff] [blame] | 1103 | # @BlockStatsSpecific: |
| 1104 | # |
| 1105 | # Block driver specific statistics |
| 1106 | # |
Markus Armbruster | 89a2273 | 2024-02-05 08:47:09 +0100 | [diff] [blame] | 1107 | # @driver: block driver name |
| 1108 | # |
Anton Nefedov | d924559 | 2019-09-23 15:17:37 +0300 | [diff] [blame] | 1109 | # Since: 4.2 |
| 1110 | ## |
| 1111 | { 'union': 'BlockStatsSpecific', |
| 1112 | 'base': { 'driver': 'BlockdevDriver' }, |
| 1113 | 'discriminator': 'driver', |
| 1114 | 'data': { |
| 1115 | 'file': 'BlockStatsSpecificFile', |
Joelle van Dyne | 14176c8 | 2021-03-15 11:03:38 -0700 | [diff] [blame] | 1116 | 'host_device': { 'type': 'BlockStatsSpecificFile', |
Marc-André Lureau | 8a9f1e1 | 2021-08-04 12:31:05 +0400 | [diff] [blame] | 1117 | 'if': 'HAVE_HOST_BLOCK_DEVICE' }, |
Philippe Mathieu-Daudé | f25e7ab | 2020-10-01 18:29:39 +0200 | [diff] [blame] | 1118 | 'nvme': 'BlockStatsSpecificNvme' } } |
Anton Nefedov | d924559 | 2019-09-23 15:17:37 +0300 | [diff] [blame] | 1119 | |
| 1120 | ## |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1121 | # @BlockStats: |
| 1122 | # |
| 1123 | # Statistics of a virtual block device or a block backing device. |
| 1124 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 1125 | # @device: If the stats are for a virtual block device, the name |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1126 | # corresponding to the virtual block device. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1127 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1128 | # @node-name: The node name of the device. (Since 2.3) |
Fam Zheng | 4875a77 | 2014-10-31 11:32:56 +0800 | [diff] [blame] | 1129 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1130 | # @qdev: The qdev ID, or if no ID is assigned, the QOM path of the |
| 1131 | # block device. (since 3.0) |
Kevin Wolf | 5a9cb5a | 2018-07-27 16:07:07 +0200 | [diff] [blame] | 1132 | # |
Andrea Bolognani | 23e4645 | 2022-05-03 09:37:35 +0200 | [diff] [blame] | 1133 | # @stats: A @BlockDeviceStats for the device. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1134 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1135 | # @driver-specific: Optional driver-specific stats. (Since 4.2) |
Anton Nefedov | d924559 | 2019-09-23 15:17:37 +0300 | [diff] [blame] | 1136 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 1137 | # @parent: This describes the file block device if it has one. |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1138 | # Contains recursively the statistics of the underlying protocol |
Markus Armbruster | 9e27207 | 2023-07-20 09:16:09 +0200 | [diff] [blame] | 1139 | # (e.g. the host file for a qcow2 image). If there is no |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1140 | # underlying protocol, this field is omitted |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1141 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 1142 | # @backing: This describes the backing block device if it has one. |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1143 | # (Since 2.0) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1144 | # |
Markus Armbruster | 9bc6e89 | 2020-11-18 07:41:58 +0100 | [diff] [blame] | 1145 | # Since: 0.14 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1146 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 1147 | { 'struct': 'BlockStats', |
Kevin Wolf | 5a9cb5a | 2018-07-27 16:07:07 +0200 | [diff] [blame] | 1148 | 'data': {'*device': 'str', '*qdev': 'str', '*node-name': 'str', |
Fam Zheng | 4875a77 | 2014-10-31 11:32:56 +0800 | [diff] [blame] | 1149 | 'stats': 'BlockDeviceStats', |
Anton Nefedov | d924559 | 2019-09-23 15:17:37 +0300 | [diff] [blame] | 1150 | '*driver-specific': 'BlockStatsSpecific', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1151 | '*parent': 'BlockStats', |
| 1152 | '*backing': 'BlockStats'} } |
| 1153 | |
| 1154 | ## |
| 1155 | # @query-blockstats: |
| 1156 | # |
| 1157 | # Query the @BlockStats for all virtual block devices. |
| 1158 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 1159 | # @query-nodes: If true, the command will query all the block nodes |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1160 | # that have a node name, in a list which will include "parent" |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 1161 | # information, but not "backing". If false or omitted, the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1162 | # behavior is as before - query all the device backends, |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 1163 | # recursively including their "parent" and "backing". Filter |
| 1164 | # nodes that were created implicitly are skipped over in this |
| 1165 | # mode. (Since 2.3) |
Fam Zheng | f71eaa7 | 2014-10-31 11:32:57 +0800 | [diff] [blame] | 1166 | # |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1167 | # Returns: A list of @BlockStats for each virtual block devices. |
| 1168 | # |
Markus Armbruster | 9bc6e89 | 2020-11-18 07:41:58 +0100 | [diff] [blame] | 1169 | # Since: 0.14 |
Marc-André Lureau | f2eaea1 | 2016-06-23 14:00:14 +0200 | [diff] [blame] | 1170 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 1171 | # .. qmp-example:: |
Marc-André Lureau | f2eaea1 | 2016-06-23 14:00:14 +0200 | [diff] [blame] | 1172 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 1173 | # -> { "execute": "query-blockstats" } |
| 1174 | # <- { |
| 1175 | # "return":[ |
| 1176 | # { |
| 1177 | # "device":"ide0-hd0", |
| 1178 | # "parent":{ |
| 1179 | # "stats":{ |
| 1180 | # "wr_highest_offset":3686448128, |
| 1181 | # "wr_bytes":9786368, |
| 1182 | # "wr_operations":751, |
| 1183 | # "rd_bytes":122567168, |
| 1184 | # "rd_operations":36772 |
| 1185 | # "wr_total_times_ns":313253456 |
| 1186 | # "rd_total_times_ns":3465673657 |
| 1187 | # "flush_total_times_ns":49653 |
| 1188 | # "flush_operations":61, |
| 1189 | # "rd_merged":0, |
| 1190 | # "wr_merged":0, |
| 1191 | # "idle_time_ns":2953431879, |
| 1192 | # "account_invalid":true, |
| 1193 | # "account_failed":false |
| 1194 | # } |
| 1195 | # }, |
| 1196 | # "stats":{ |
| 1197 | # "wr_highest_offset":2821110784, |
| 1198 | # "wr_bytes":9786368, |
| 1199 | # "wr_operations":692, |
| 1200 | # "rd_bytes":122739200, |
| 1201 | # "rd_operations":36604 |
| 1202 | # "flush_operations":51, |
| 1203 | # "wr_total_times_ns":313253456 |
| 1204 | # "rd_total_times_ns":3465673657 |
| 1205 | # "flush_total_times_ns":49653, |
| 1206 | # "rd_merged":0, |
| 1207 | # "wr_merged":0, |
| 1208 | # "idle_time_ns":2953431879, |
| 1209 | # "account_invalid":true, |
| 1210 | # "account_failed":false |
| 1211 | # }, |
| 1212 | # "qdev": "/machine/unattached/device[23]" |
| 1213 | # }, |
| 1214 | # { |
| 1215 | # "device":"ide1-cd0", |
| 1216 | # "stats":{ |
| 1217 | # "wr_highest_offset":0, |
| 1218 | # "wr_bytes":0, |
| 1219 | # "wr_operations":0, |
| 1220 | # "rd_bytes":0, |
| 1221 | # "rd_operations":0 |
| 1222 | # "flush_operations":0, |
| 1223 | # "wr_total_times_ns":0 |
| 1224 | # "rd_total_times_ns":0 |
| 1225 | # "flush_total_times_ns":0, |
| 1226 | # "rd_merged":0, |
| 1227 | # "wr_merged":0, |
| 1228 | # "account_invalid":false, |
| 1229 | # "account_failed":false |
| 1230 | # }, |
| 1231 | # "qdev": "/machine/unattached/device[24]" |
| 1232 | # }, |
| 1233 | # { |
| 1234 | # "device":"floppy0", |
| 1235 | # "stats":{ |
| 1236 | # "wr_highest_offset":0, |
| 1237 | # "wr_bytes":0, |
| 1238 | # "wr_operations":0, |
| 1239 | # "rd_bytes":0, |
| 1240 | # "rd_operations":0 |
| 1241 | # "flush_operations":0, |
| 1242 | # "wr_total_times_ns":0 |
| 1243 | # "rd_total_times_ns":0 |
| 1244 | # "flush_total_times_ns":0, |
| 1245 | # "rd_merged":0, |
| 1246 | # "wr_merged":0, |
| 1247 | # "account_invalid":false, |
| 1248 | # "account_failed":false |
| 1249 | # }, |
| 1250 | # "qdev": "/machine/unattached/device[16]" |
| 1251 | # }, |
| 1252 | # { |
| 1253 | # "device":"sd0", |
| 1254 | # "stats":{ |
| 1255 | # "wr_highest_offset":0, |
| 1256 | # "wr_bytes":0, |
| 1257 | # "wr_operations":0, |
| 1258 | # "rd_bytes":0, |
| 1259 | # "rd_operations":0 |
| 1260 | # "flush_operations":0, |
| 1261 | # "wr_total_times_ns":0 |
| 1262 | # "rd_total_times_ns":0 |
| 1263 | # "flush_total_times_ns":0, |
| 1264 | # "rd_merged":0, |
| 1265 | # "wr_merged":0, |
| 1266 | # "account_invalid":false, |
| 1267 | # "account_failed":false |
| 1268 | # } |
| 1269 | # } |
| 1270 | # ] |
| 1271 | # } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1272 | ## |
Fam Zheng | f71eaa7 | 2014-10-31 11:32:57 +0800 | [diff] [blame] | 1273 | { 'command': 'query-blockstats', |
| 1274 | 'data': { '*query-nodes': 'bool' }, |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 1275 | 'returns': ['BlockStats'], |
| 1276 | 'allow-preconfig': true } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1277 | |
| 1278 | ## |
| 1279 | # @BlockdevOnError: |
| 1280 | # |
| 1281 | # An enumeration of possible behaviors for errors on I/O operations. |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1282 | # The exact meaning depends on whether the I/O was initiated by a |
| 1283 | # guest or by a block job |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1284 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1285 | # @report: for guest operations, report the error to the guest; for |
| 1286 | # jobs, cancel the job |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1287 | # |
| 1288 | # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 1289 | # or BLOCK_JOB_ERROR). The backup, mirror and commit block jobs |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1290 | # retry the failing request later and may still complete |
| 1291 | # successfully. The stream block job continues to stream and will |
| 1292 | # complete with an error. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1293 | # |
| 1294 | # @enospc: same as @stop on ENOSPC, same as @report otherwise. |
| 1295 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1296 | # @stop: for guest operations, stop the virtual machine; for jobs, |
| 1297 | # pause the job |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1298 | # |
Kevin Wolf | 8c39825 | 2016-06-29 17:41:35 +0200 | [diff] [blame] | 1299 | # @auto: inherit the error handling policy of the backend (since: 2.7) |
| 1300 | # |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1301 | # Since: 1.3 |
| 1302 | ## |
| 1303 | { 'enum': 'BlockdevOnError', |
Kevin Wolf | 8c39825 | 2016-06-29 17:41:35 +0200 | [diff] [blame] | 1304 | 'data': ['report', 'ignore', 'enospc', 'stop', 'auto'] } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1305 | |
| 1306 | ## |
| 1307 | # @MirrorSyncMode: |
| 1308 | # |
| 1309 | # An enumeration of possible behaviors for the initial synchronization |
| 1310 | # phase of storage mirroring. |
| 1311 | # |
| 1312 | # @top: copies data in the topmost image to the destination |
| 1313 | # |
| 1314 | # @full: copies data from all images to the destination |
| 1315 | # |
| 1316 | # @none: only copy data written from now on |
| 1317 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1318 | # @incremental: only copy data described by the dirty bitmap. |
| 1319 | # (since: 2.4) |
John Snow | c8b5650 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1320 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1321 | # @bitmap: only copy data described by the dirty bitmap. (since: 4.2) |
| 1322 | # Behavior on completion is determined by the BitmapSyncMode. |
John Snow | d58d845 | 2015-04-17 19:49:58 -0400 | [diff] [blame] | 1323 | # |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1324 | # Since: 1.3 |
| 1325 | ## |
| 1326 | { 'enum': 'MirrorSyncMode', |
John Snow | c8b5650 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1327 | 'data': ['top', 'full', 'none', 'incremental', 'bitmap'] } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1328 | |
| 1329 | ## |
John Snow | 00a463b | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1330 | # @BitmapSyncMode: |
| 1331 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1332 | # An enumeration of possible behaviors for the synchronization of a |
| 1333 | # bitmap when used for data copy operations. |
John Snow | 00a463b | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1334 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1335 | # @on-success: The bitmap is only synced when the operation is |
| 1336 | # successful. This is the behavior always used for 'INCREMENTAL' |
| 1337 | # backups. |
John Snow | 00a463b | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1338 | # |
John Snow | cf0cd29 | 2019-07-29 16:35:53 -0400 | [diff] [blame] | 1339 | # @never: The bitmap is never synchronized with the operation, and is |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1340 | # treated solely as a read-only manifest of blocks to copy. |
John Snow | cf0cd29 | 2019-07-29 16:35:53 -0400 | [diff] [blame] | 1341 | # |
John Snow | c23909e | 2019-07-29 16:35:53 -0400 | [diff] [blame] | 1342 | # @always: The bitmap is always synchronized with the operation, |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1343 | # regardless of whether or not the operation was successful. |
John Snow | c23909e | 2019-07-29 16:35:53 -0400 | [diff] [blame] | 1344 | # |
John Snow | 00a463b | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1345 | # Since: 4.2 |
| 1346 | ## |
| 1347 | { 'enum': 'BitmapSyncMode', |
John Snow | c23909e | 2019-07-29 16:35:53 -0400 | [diff] [blame] | 1348 | 'data': ['on-success', 'never', 'always'] } |
John Snow | 00a463b | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1349 | |
| 1350 | ## |
Max Reitz | d06107a | 2018-06-13 20:18:21 +0200 | [diff] [blame] | 1351 | # @MirrorCopyMode: |
| 1352 | # |
| 1353 | # An enumeration whose values tell the mirror block job when to |
| 1354 | # trigger writes to the target. |
| 1355 | # |
| 1356 | # @background: copy data in background only. |
| 1357 | # |
| 1358 | # @write-blocking: when data is written to the source, write it |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1359 | # (synchronously) to the target as well. In addition, data is |
| 1360 | # copied in background just like in @background mode. |
Max Reitz | d06107a | 2018-06-13 20:18:21 +0200 | [diff] [blame] | 1361 | # |
| 1362 | # Since: 3.0 |
| 1363 | ## |
| 1364 | { 'enum': 'MirrorCopyMode', |
| 1365 | 'data': ['background', 'write-blocking'] } |
| 1366 | |
| 1367 | ## |
Fiona Ebner | 76cb2f2 | 2023-10-31 14:54:30 +0100 | [diff] [blame] | 1368 | # @BlockJobInfoMirror: |
| 1369 | # |
| 1370 | # Information specific to mirror block jobs. |
| 1371 | # |
| 1372 | # @actively-synced: Whether the source is actively synced to the |
| 1373 | # target, i.e. same data and new writes are done synchronously to |
| 1374 | # both. |
| 1375 | # |
Markus Armbruster | 37507c1 | 2024-01-20 10:53:27 +0100 | [diff] [blame] | 1376 | # Since: 8.2 |
Fiona Ebner | 76cb2f2 | 2023-10-31 14:54:30 +0100 | [diff] [blame] | 1377 | ## |
| 1378 | { 'struct': 'BlockJobInfoMirror', |
| 1379 | 'data': { 'actively-synced': 'bool' } } |
| 1380 | |
| 1381 | ## |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1382 | # @BlockJobInfo: |
| 1383 | # |
| 1384 | # Information about a long-running block device operation. |
| 1385 | # |
| 1386 | # @type: the job type ('stream' for image streaming) |
| 1387 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1388 | # @device: The job identifier. Originally the device name but other |
| 1389 | # values are allowed since QEMU 2.7 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1390 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1391 | # @len: Estimated @offset value at the completion of the job. This |
| 1392 | # value can arbitrarily change while the job is running, in both |
| 1393 | # directions. |
Kevin Wolf | a81e0a8 | 2018-05-16 13:04:34 +0200 | [diff] [blame] | 1394 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1395 | # @offset: Progress made until now. The unit is arbitrary and the |
| 1396 | # value can only meaningfully be used for the ratio of @offset to |
| 1397 | # @len. The value is monotonically increasing. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1398 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1399 | # @busy: false if the job is known to be in a quiescent state, with no |
| 1400 | # pending I/O. (Since 1.3) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1401 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1402 | # @paused: whether the job is paused or, if @busy is true, will pause |
| 1403 | # itself as soon as possible. (Since 1.3) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1404 | # |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1405 | # @speed: the rate limit, bytes per second |
| 1406 | # |
| 1407 | # @io-status: the status of the job (since 1.3) |
| 1408 | # |
Max Reitz | ef6dbf1 | 2014-10-24 15:57:34 +0200 | [diff] [blame] | 1409 | # @ready: true if the job may be completed (since 2.2) |
| 1410 | # |
John Snow | 58b295b | 2018-03-10 03:27:29 -0500 | [diff] [blame] | 1411 | # @status: Current job state/status (since 2.12) |
| 1412 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1413 | # @auto-finalize: Job will finalize itself when PENDING, moving to the |
| 1414 | # CONCLUDED state. (since 2.12) |
John Snow | b40dacd | 2018-03-10 03:27:44 -0500 | [diff] [blame] | 1415 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1416 | # @auto-dismiss: Job will dismiss itself when CONCLUDED, moving to the |
| 1417 | # NULL state and disappearing from the query list. (since 2.12) |
John Snow | b40dacd | 2018-03-10 03:27:44 -0500 | [diff] [blame] | 1418 | # |
John Snow | ab9ba61 | 2018-05-08 19:36:59 -0400 | [diff] [blame] | 1419 | # @error: Error information if the job did not complete successfully. |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1420 | # Not set if the job completed successfully. (since 2.12.1) |
John Snow | ab9ba61 | 2018-05-08 19:36:59 -0400 | [diff] [blame] | 1421 | # |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1422 | # Since: 1.1 |
| 1423 | ## |
Fiona Ebner | 701efc9 | 2023-10-31 14:54:28 +0100 | [diff] [blame] | 1424 | { 'union': 'BlockJobInfo', |
| 1425 | 'base': {'type': 'JobType', 'device': 'str', 'len': 'int', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1426 | 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int', |
John Snow | 58b295b | 2018-03-10 03:27:29 -0500 | [diff] [blame] | 1427 | 'io-status': 'BlockDeviceIoStatus', 'ready': 'bool', |
Kevin Wolf | a50c2ab | 2018-04-13 17:19:31 +0200 | [diff] [blame] | 1428 | 'status': 'JobStatus', |
John Snow | ab9ba61 | 2018-05-08 19:36:59 -0400 | [diff] [blame] | 1429 | 'auto-finalize': 'bool', 'auto-dismiss': 'bool', |
Fiona Ebner | 701efc9 | 2023-10-31 14:54:28 +0100 | [diff] [blame] | 1430 | '*error': 'str' }, |
| 1431 | 'discriminator': 'type', |
Fiona Ebner | 76cb2f2 | 2023-10-31 14:54:30 +0100 | [diff] [blame] | 1432 | 'data': { 'mirror': 'BlockJobInfoMirror' } } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1433 | |
| 1434 | ## |
| 1435 | # @query-block-jobs: |
| 1436 | # |
| 1437 | # Return information about long-running block device operations. |
| 1438 | # |
| 1439 | # Returns: a list of @BlockJobInfo for each active block job |
| 1440 | # |
| 1441 | # Since: 1.1 |
| 1442 | ## |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 1443 | { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'], |
| 1444 | 'allow-preconfig': true } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1445 | |
| 1446 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 1447 | # @block_resize: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1448 | # |
| 1449 | # Resize a block image while a guest is running. |
| 1450 | # |
| 1451 | # Either @device or @node-name must be set but not both. |
| 1452 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 1453 | # @device: the name of the device to get the image resized |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1454 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 1455 | # @node-name: graph node name to get the image resized (Since 2.0) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1456 | # |
Andrea Bolognani | 23e4645 | 2022-05-03 09:37:35 +0200 | [diff] [blame] | 1457 | # @size: new image size in bytes |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1458 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 1459 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1460 | # - If @device is not a valid block device, DeviceNotFound |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1461 | # |
Markus Armbruster | 9bc6e89 | 2020-11-18 07:41:58 +0100 | [diff] [blame] | 1462 | # Since: 0.14 |
Marc-André Lureau | 0dc869c | 2016-06-23 14:01:52 +0200 | [diff] [blame] | 1463 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 1464 | # .. qmp-example:: |
Marc-André Lureau | 0dc869c | 2016-06-23 14:01:52 +0200 | [diff] [blame] | 1465 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 1466 | # -> { "execute": "block_resize", |
| 1467 | # "arguments": { "device": "scratch", "size": 1073741824 } } |
| 1468 | # <- { "return": {} } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1469 | ## |
Marc-André Lureau | b0ddeba | 2018-12-08 15:16:04 +0400 | [diff] [blame] | 1470 | { 'command': 'block_resize', |
| 1471 | 'data': { '*device': 'str', |
| 1472 | '*node-name': 'str', |
Kevin Wolf | eb94b81 | 2020-10-05 17:58:55 +0200 | [diff] [blame] | 1473 | 'size': 'int' }, |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 1474 | 'coroutine': true, |
| 1475 | 'allow-preconfig': true } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1476 | |
| 1477 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 1478 | # @NewImageMode: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1479 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1480 | # An enumeration that tells QEMU how to set the backing file path in a |
| 1481 | # new image file. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1482 | # |
| 1483 | # @existing: QEMU should look for an existing image file. |
| 1484 | # |
| 1485 | # @absolute-paths: QEMU should create a new image with absolute paths |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1486 | # for the backing file. If there is no backing file available, |
| 1487 | # the new image will not be backed either. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1488 | # |
| 1489 | # Since: 1.1 |
| 1490 | ## |
| 1491 | { 'enum': 'NewImageMode', |
| 1492 | 'data': [ 'existing', 'absolute-paths' ] } |
| 1493 | |
| 1494 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 1495 | # @BlockdevSnapshotSync: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1496 | # |
| 1497 | # Either @device or @node-name must be set but not both. |
| 1498 | # |
Max Reitz | 681b86a | 2019-06-03 22:22:35 +0200 | [diff] [blame] | 1499 | # @device: the name of the device to take a snapshot of. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1500 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1501 | # @node-name: graph node name to generate the snapshot from (Since |
| 1502 | # 2.0) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1503 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1504 | # @snapshot-file: the target of the new overlay image. If the file |
| 1505 | # exists, or if it is a device, the overlay will be created in the |
| 1506 | # existing file/device. Otherwise, a new file will be created. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1507 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1508 | # @snapshot-node-name: the graph node name of the new image (Since |
| 1509 | # 2.0) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1510 | # |
Max Reitz | 681b86a | 2019-06-03 22:22:35 +0200 | [diff] [blame] | 1511 | # @format: the format of the overlay image, default is 'qcow2'. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1512 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 1513 | # @mode: whether and how QEMU should create a new image, default is |
Markus Armbruster | 9e27207 | 2023-07-20 09:16:09 +0200 | [diff] [blame] | 1514 | # 'absolute-paths'. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1515 | ## |
Alberto Garcia | a911e6a | 2015-10-26 14:27:14 +0200 | [diff] [blame] | 1516 | { 'struct': 'BlockdevSnapshotSync', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1517 | 'data': { '*device': 'str', '*node-name': 'str', |
| 1518 | 'snapshot-file': 'str', '*snapshot-node-name': 'str', |
| 1519 | '*format': 'str', '*mode': 'NewImageMode' } } |
| 1520 | |
| 1521 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 1522 | # @BlockdevSnapshot: |
Alberto Garcia | 43de7e2 | 2015-10-26 14:27:16 +0200 | [diff] [blame] | 1523 | # |
Max Reitz | 681b86a | 2019-06-03 22:22:35 +0200 | [diff] [blame] | 1524 | # @node: device or node name that will have a snapshot taken. |
Alberto Garcia | 43de7e2 | 2015-10-26 14:27:16 +0200 | [diff] [blame] | 1525 | # |
| 1526 | # @overlay: reference to the existing block device that will become |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1527 | # the overlay of @node, as part of taking the snapshot. It must |
| 1528 | # not have a current backing file (this can be achieved by passing |
| 1529 | # "backing": null to blockdev-add). |
Alberto Garcia | 43de7e2 | 2015-10-26 14:27:16 +0200 | [diff] [blame] | 1530 | # |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 1531 | # Since: 2.5 |
Alberto Garcia | 43de7e2 | 2015-10-26 14:27:16 +0200 | [diff] [blame] | 1532 | ## |
| 1533 | { 'struct': 'BlockdevSnapshot', |
| 1534 | 'data': { 'node': 'str', 'overlay': 'str' } } |
| 1535 | |
| 1536 | ## |
Vladimir Sementsov-Ogievskiy | 86c6a3b | 2021-01-17 00:46:43 +0300 | [diff] [blame] | 1537 | # @BackupPerf: |
| 1538 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1539 | # Optional parameters for backup. These parameters don't affect |
Vladimir Sementsov-Ogievskiy | 86c6a3b | 2021-01-17 00:46:43 +0300 | [diff] [blame] | 1540 | # functionality, but may significantly affect performance. |
| 1541 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1542 | # @use-copy-range: Use copy offloading. Default false. |
Vladimir Sementsov-Ogievskiy | 86c6a3b | 2021-01-17 00:46:43 +0300 | [diff] [blame] | 1543 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1544 | # @max-workers: Maximum number of parallel requests for the sustained |
| 1545 | # background copying process. Doesn't influence copy-before-write |
| 1546 | # operations. Default 64. |
Vladimir Sementsov-Ogievskiy | 2c59fd8 | 2021-01-17 00:46:52 +0300 | [diff] [blame] | 1547 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1548 | # @max-chunk: Maximum request length for the sustained background |
| 1549 | # copying process. Doesn't influence copy-before-write |
| 1550 | # operations. 0 means unlimited. If max-chunk is non-zero then |
| 1551 | # it should not be less than job cluster size which is calculated |
| 1552 | # as maximum of target image cluster size and 64k. Default 0. |
Vladimir Sementsov-Ogievskiy | 2c59fd8 | 2021-01-17 00:46:52 +0300 | [diff] [blame] | 1553 | # |
Vladimir Sementsov-Ogievskiy | 86c6a3b | 2021-01-17 00:46:43 +0300 | [diff] [blame] | 1554 | # Since: 6.0 |
| 1555 | ## |
| 1556 | { 'struct': 'BackupPerf', |
Vladimir Sementsov-Ogievskiy | 2c59fd8 | 2021-01-17 00:46:52 +0300 | [diff] [blame] | 1557 | 'data': { '*use-copy-range': 'bool', |
| 1558 | '*max-workers': 'int', '*max-chunk': 'int64' } } |
Vladimir Sementsov-Ogievskiy | 86c6a3b | 2021-01-17 00:46:43 +0300 | [diff] [blame] | 1559 | |
| 1560 | ## |
John Snow | 3c95037 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1561 | # @BackupCommon: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1562 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1563 | # @job-id: identifier for the newly-created block job. If omitted, |
| 1564 | # the device name will be used. (Since 2.7) |
Alberto Garcia | 70559d4 | 2016-07-05 17:28:58 +0300 | [diff] [blame] | 1565 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1566 | # @device: the device name or node-name of a root node which should be |
| 1567 | # copied. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1568 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1569 | # @sync: what parts of the disk image should be copied to the |
| 1570 | # destination (all the disk, only the sectors allocated in the |
| 1571 | # topmost image, from a dirty bitmap, or only new I/O). |
John Snow | 3c95037 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1572 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1573 | # @speed: the maximum speed, in bytes per second. The default is 0, |
| 1574 | # for unlimited. |
John Snow | 3c95037 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1575 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1576 | # @bitmap: The name of a dirty bitmap to use. Must be present if sync |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 1577 | # is "bitmap" or "incremental". Can be present if sync is "full" |
Markus Armbruster | 9e27207 | 2023-07-20 09:16:09 +0200 | [diff] [blame] | 1578 | # or "top". Must not be present otherwise. |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1579 | # (Since 2.4 (drive-backup), 3.1 (blockdev-backup)) |
John Snow | c8b5650 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1580 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1581 | # @bitmap-mode: Specifies the type of data the bitmap should contain |
| 1582 | # after the operation concludes. Must be present if a bitmap was |
| 1583 | # provided, Must NOT be present otherwise. (Since 4.2) |
John Snow | 3c95037 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1584 | # |
| 1585 | # @compress: true to compress data, if the target format supports it. |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1586 | # (default: false) (since 2.8) |
John Snow | 3c95037 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1587 | # |
| 1588 | # @on-source-error: the action to take on an error on the source, |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1589 | # default 'report'. 'stop' and 'enospc' can only be used if the |
| 1590 | # block device supports io-status (see BlockInfo). |
John Snow | 3c95037 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1591 | # |
| 1592 | # @on-target-error: the action to take on an error on the target, |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1593 | # default 'report' (no limitations, since this applies to a |
| 1594 | # different block device than @device). |
John Snow | 3c95037 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1595 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1596 | # @auto-finalize: When false, this job will wait in a PENDING state |
| 1597 | # after it has finished its work, waiting for @block-job-finalize |
| 1598 | # before making any block graph changes. When true, this job will |
| 1599 | # automatically perform its abort or commit actions. Defaults to |
| 1600 | # true. (Since 2.12) |
John Snow | 3c95037 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1601 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1602 | # @auto-dismiss: When false, this job will wait in a CONCLUDED state |
| 1603 | # after it has completely ceased all work, and awaits |
| 1604 | # @block-job-dismiss. When true, this job will automatically |
| 1605 | # disappear from the query list without user intervention. |
| 1606 | # Defaults to true. (Since 2.12) |
John Snow | 3c95037 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1607 | # |
Vladimir Sementsov-Ogievskiy | 00e30f0 | 2019-10-01 16:14:09 +0300 | [diff] [blame] | 1608 | # @filter-node-name: the node name that should be assigned to the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1609 | # filter driver that the backup job inserts into the graph above |
| 1610 | # node specified by @drive. If this option is not given, a node |
| 1611 | # name is autogenerated. (Since: 4.2) |
Vladimir Sementsov-Ogievskiy | 00e30f0 | 2019-10-01 16:14:09 +0300 | [diff] [blame] | 1612 | # |
Vladimir Sementsov-Ogievskiy | 0fd05c8 | 2024-03-13 18:28:21 +0300 | [diff] [blame] | 1613 | # @discard-source: Discard blocks on source which have already been |
| 1614 | # copied to the target. (Since 9.1) |
| 1615 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1616 | # @x-perf: Performance options. (Since 6.0) |
Vladimir Sementsov-Ogievskiy | 86c6a3b | 2021-01-17 00:46:43 +0300 | [diff] [blame] | 1617 | # |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 1618 | # Features: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1619 | # |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 1620 | # @unstable: Member @x-perf is experimental. |
| 1621 | # |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 1622 | # .. note:: @on-source-error and @on-target-error only affect |
| 1623 | # background I/O. If an error occurs during a guest write request, |
| 1624 | # the device's rerror/werror actions will be used. |
John Snow | 3c95037 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1625 | # |
| 1626 | # Since: 4.2 |
| 1627 | ## |
| 1628 | { 'struct': 'BackupCommon', |
| 1629 | 'data': { '*job-id': 'str', 'device': 'str', |
| 1630 | 'sync': 'MirrorSyncMode', '*speed': 'int', |
John Snow | c8b5650 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1631 | '*bitmap': 'str', '*bitmap-mode': 'BitmapSyncMode', |
| 1632 | '*compress': 'bool', |
John Snow | 3c95037 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1633 | '*on-source-error': 'BlockdevOnError', |
| 1634 | '*on-target-error': 'BlockdevOnError', |
Vladimir Sementsov-Ogievskiy | 00e30f0 | 2019-10-01 16:14:09 +0300 | [diff] [blame] | 1635 | '*auto-finalize': 'bool', '*auto-dismiss': 'bool', |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 1636 | '*filter-node-name': 'str', |
Vladimir Sementsov-Ogievskiy | 0fd05c8 | 2024-03-13 18:28:21 +0300 | [diff] [blame] | 1637 | '*discard-source': 'bool', |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 1638 | '*x-perf': { 'type': 'BackupPerf', |
| 1639 | 'features': [ 'unstable' ] } } } |
John Snow | 3c95037 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1640 | |
| 1641 | ## |
| 1642 | # @DriveBackup: |
| 1643 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1644 | # @target: the target of the new image. If the file exists, or if it |
| 1645 | # is a device, the existing file/device will be used as the new |
| 1646 | # destination. If it does not exist, a new file will be created. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1647 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1648 | # @format: the format of the new destination, default is to probe if |
| 1649 | # @mode is 'existing', else the format of the source |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1650 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 1651 | # @mode: whether and how QEMU should create a new image, default is |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1652 | # 'absolute-paths'. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1653 | # |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1654 | # Since: 1.6 |
| 1655 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 1656 | { 'struct': 'DriveBackup', |
John Snow | 3c95037 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1657 | 'base': 'BackupCommon', |
| 1658 | 'data': { 'target': 'str', |
| 1659 | '*format': 'str', |
| 1660 | '*mode': 'NewImageMode' } } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1661 | |
| 1662 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 1663 | # @BlockdevBackup: |
Fam Zheng | c29c1dd | 2014-12-18 18:37:05 +0800 | [diff] [blame] | 1664 | # |
Kevin Wolf | 39d990a | 2016-08-02 19:22:04 +0200 | [diff] [blame] | 1665 | # @target: the device name or node-name of the backup target node. |
Fam Zheng | c29c1dd | 2014-12-18 18:37:05 +0800 | [diff] [blame] | 1666 | # |
Fam Zheng | c29c1dd | 2014-12-18 18:37:05 +0800 | [diff] [blame] | 1667 | # Since: 2.3 |
| 1668 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 1669 | { 'struct': 'BlockdevBackup', |
John Snow | 3c95037 | 2019-07-29 16:35:52 -0400 | [diff] [blame] | 1670 | 'base': 'BackupCommon', |
| 1671 | 'data': { 'target': 'str' } } |
Fam Zheng | c29c1dd | 2014-12-18 18:37:05 +0800 | [diff] [blame] | 1672 | |
| 1673 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 1674 | # @blockdev-snapshot-sync: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1675 | # |
Max Reitz | 681b86a | 2019-06-03 22:22:35 +0200 | [diff] [blame] | 1676 | # Takes a synchronous snapshot of a block device. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1677 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 1678 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1679 | # - If @device is not a valid block device, DeviceNotFound |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1680 | # |
Markus Armbruster | 9bc6e89 | 2020-11-18 07:41:58 +0100 | [diff] [blame] | 1681 | # Since: 0.14 |
Marc-André Lureau | b4039d8 | 2016-06-23 14:04:28 +0200 | [diff] [blame] | 1682 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 1683 | # .. qmp-example:: |
Marc-André Lureau | b4039d8 | 2016-06-23 14:04:28 +0200 | [diff] [blame] | 1684 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 1685 | # -> { "execute": "blockdev-snapshot-sync", |
| 1686 | # "arguments": { "device": "ide-hd0", |
| 1687 | # "snapshot-file": |
| 1688 | # "/some/place/my-image", |
| 1689 | # "format": "qcow2" } } |
| 1690 | # <- { "return": {} } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1691 | ## |
| 1692 | { 'command': 'blockdev-snapshot-sync', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 1693 | 'data': 'BlockdevSnapshotSync', |
| 1694 | 'allow-preconfig': true } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1695 | |
Alberto Garcia | 43de7e2 | 2015-10-26 14:27:16 +0200 | [diff] [blame] | 1696 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 1697 | # @blockdev-snapshot: |
Alberto Garcia | 43de7e2 | 2015-10-26 14:27:16 +0200 | [diff] [blame] | 1698 | # |
Max Reitz | 681b86a | 2019-06-03 22:22:35 +0200 | [diff] [blame] | 1699 | # Takes a snapshot of a block device. |
Alberto Garcia | 43de7e2 | 2015-10-26 14:27:16 +0200 | [diff] [blame] | 1700 | # |
Max Reitz | 681b86a | 2019-06-03 22:22:35 +0200 | [diff] [blame] | 1701 | # Take a snapshot, by installing 'node' as the backing image of |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 1702 | # 'overlay'. Additionally, if 'node' is associated with a block |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1703 | # device, the block device changes to using 'overlay' as its new |
| 1704 | # active image. |
Marc-André Lureau | 3282eca | 2016-06-23 14:08:19 +0200 | [diff] [blame] | 1705 | # |
Peter Krempa | c6bdc31 | 2020-03-10 12:38:31 +0100 | [diff] [blame] | 1706 | # Features: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1707 | # |
| 1708 | # @allow-write-only-overlay: If present, the check whether this |
| 1709 | # operation is safe was relaxed so that it can be used to change |
| 1710 | # backing file of a destination of a blockdev-mirror. (since 5.0) |
Peter Krempa | c6bdc31 | 2020-03-10 12:38:31 +0100 | [diff] [blame] | 1711 | # |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 1712 | # Since: 2.5 |
Marc-André Lureau | 3282eca | 2016-06-23 14:08:19 +0200 | [diff] [blame] | 1713 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 1714 | # .. qmp-example:: |
Marc-André Lureau | 3282eca | 2016-06-23 14:08:19 +0200 | [diff] [blame] | 1715 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 1716 | # -> { "execute": "blockdev-add", |
| 1717 | # "arguments": { "driver": "qcow2", |
| 1718 | # "node-name": "node1534", |
| 1719 | # "file": { "driver": "file", |
| 1720 | # "filename": "hd1.qcow2" }, |
| 1721 | # "backing": null } } |
Marc-André Lureau | 3282eca | 2016-06-23 14:08:19 +0200 | [diff] [blame] | 1722 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 1723 | # <- { "return": {} } |
Marc-André Lureau | 3282eca | 2016-06-23 14:08:19 +0200 | [diff] [blame] | 1724 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 1725 | # -> { "execute": "blockdev-snapshot", |
| 1726 | # "arguments": { "node": "ide-hd0", |
| 1727 | # "overlay": "node1534" } } |
| 1728 | # <- { "return": {} } |
Alberto Garcia | 43de7e2 | 2015-10-26 14:27:16 +0200 | [diff] [blame] | 1729 | ## |
| 1730 | { 'command': 'blockdev-snapshot', |
Peter Krempa | c6bdc31 | 2020-03-10 12:38:31 +0100 | [diff] [blame] | 1731 | 'data': 'BlockdevSnapshot', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 1732 | 'features': [ 'allow-write-only-overlay' ], |
| 1733 | 'allow-preconfig': true } |
Alberto Garcia | 43de7e2 | 2015-10-26 14:27:16 +0200 | [diff] [blame] | 1734 | |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1735 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 1736 | # @change-backing-file: |
Jeff Cody | fa40e65 | 2014-07-01 09:52:16 +0200 | [diff] [blame] | 1737 | # |
| 1738 | # Change the backing file in the image file metadata. This does not |
| 1739 | # cause QEMU to reopen the image file to reparse the backing filename |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1740 | # (it may, however, perform a reopen to change permissions from r/o -> |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 1741 | # r/w -> r/o, if needed). The new backing file string is written into |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1742 | # the image file metadata, and the QEMU internal strings are updated. |
Jeff Cody | fa40e65 | 2014-07-01 09:52:16 +0200 | [diff] [blame] | 1743 | # |
| 1744 | # @image-node-name: The name of the block driver state node of the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1745 | # image to modify. The "device" argument is used to verify |
| 1746 | # "image-node-name" is in the chain described by "device". |
Jeff Cody | fa40e65 | 2014-07-01 09:52:16 +0200 | [diff] [blame] | 1747 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 1748 | # @device: The device name or node-name of the root node that owns |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1749 | # image-node-name. |
Jeff Cody | fa40e65 | 2014-07-01 09:52:16 +0200 | [diff] [blame] | 1750 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1751 | # @backing-file: The string to write as the backing file. This string |
| 1752 | # is not validated, so care should be taken when specifying the |
| 1753 | # string or the image chain may not be able to be reopened again. |
Jeff Cody | fa40e65 | 2014-07-01 09:52:16 +0200 | [diff] [blame] | 1754 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 1755 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1756 | # - If "device" does not exist or cannot be determined, |
| 1757 | # DeviceNotFound |
Marc-André Lureau | 280c4b3 | 2016-06-23 14:09:20 +0200 | [diff] [blame] | 1758 | # |
Jeff Cody | fa40e65 | 2014-07-01 09:52:16 +0200 | [diff] [blame] | 1759 | # Since: 2.1 |
| 1760 | ## |
| 1761 | { 'command': 'change-backing-file', |
| 1762 | 'data': { 'device': 'str', 'image-node-name': 'str', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 1763 | 'backing-file': 'str' }, |
| 1764 | 'allow-preconfig': true } |
Jeff Cody | fa40e65 | 2014-07-01 09:52:16 +0200 | [diff] [blame] | 1765 | |
| 1766 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 1767 | # @block-commit: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1768 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1769 | # Live commit of data from overlay image nodes into backing nodes - |
| 1770 | # i.e., writes data between 'top' and 'base' into 'base'. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1771 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1772 | # If top == base, that is an error. If top has no overlays on top of |
| 1773 | # it, or if it is in use by a writer, the job will not be completed by |
| 1774 | # itself. The user needs to complete the job with the |
| 1775 | # block-job-complete command after getting the ready event. (Since |
| 1776 | # 2.0) |
Max Reitz | 05ea385 | 2019-06-11 21:19:26 +0200 | [diff] [blame] | 1777 | # |
| 1778 | # If the base image is smaller than top, then the base image will be |
| 1779 | # resized to be the same size as top. If top is smaller than the base |
| 1780 | # image, the base will not be truncated. If you want the base image |
| 1781 | # size to match the size of the smaller top, you can safely truncate |
| 1782 | # it yourself once the commit operation successfully completes. |
| 1783 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1784 | # @job-id: identifier for the newly-created block job. If omitted, |
| 1785 | # the device name will be used. (Since 2.7) |
Alberto Garcia | fd62c60 | 2016-07-05 17:29:00 +0300 | [diff] [blame] | 1786 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 1787 | # @device: the device name or node-name of a root node |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1788 | # |
Kevin Wolf | 3c605f4 | 2017-06-27 17:18:20 +0200 | [diff] [blame] | 1789 | # @base-node: The node name of the backing image to write data into. |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1790 | # If not specified, this is the deepest backing image. |
| 1791 | # (since: 3.1) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1792 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1793 | # @base: Same as @base-node, except that it is a file name rather than |
| 1794 | # a node name. This must be the exact filename string that was |
| 1795 | # used to open the node; other strings, even if addressing the |
| 1796 | # same file, are not accepted |
Kevin Wolf | 3c605f4 | 2017-06-27 17:18:20 +0200 | [diff] [blame] | 1797 | # |
| 1798 | # @top-node: The node name of the backing image within the image chain |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1799 | # which contains the topmost data to be committed down. If not |
| 1800 | # specified, this is the active layer. (since: 3.1) |
Kevin Wolf | 3c605f4 | 2017-06-27 17:18:20 +0200 | [diff] [blame] | 1801 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1802 | # @top: Same as @top-node, except that it is a file name rather than a |
| 1803 | # node name. This must be the exact filename string that was used |
| 1804 | # to open the node; other strings, even if addressing the same |
| 1805 | # file, are not accepted |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1806 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 1807 | # @backing-file: The backing file string to write into the overlay |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1808 | # image of 'top'. If 'top' does not have an overlay image, or if |
| 1809 | # 'top' is in use by a writer, specifying a backing file string is |
| 1810 | # an error. |
Jeff Cody | 54e2690 | 2014-06-25 15:40:10 -0400 | [diff] [blame] | 1811 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1812 | # This filename is not validated. If a pathname string is such |
| 1813 | # that it cannot be resolved by QEMU, that means that subsequent |
| 1814 | # QMP or HMP commands must use node-names for the image in |
| 1815 | # question, as filename lookup methods will fail. |
Jeff Cody | 54e2690 | 2014-06-25 15:40:10 -0400 | [diff] [blame] | 1816 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1817 | # If not specified, QEMU will automatically determine the backing |
| 1818 | # file string to use, or error out if there is no obvious choice. |
| 1819 | # Care should be taken when specifying the string, to specify a |
| 1820 | # valid filename or protocol. (Since 2.1) |
Jeff Cody | 54e2690 | 2014-06-25 15:40:10 -0400 | [diff] [blame] | 1821 | # |
Markus Armbruster | 209e64d | 2024-03-22 15:09:08 +0100 | [diff] [blame] | 1822 | # @backing-mask-protocol: If true, replace any protocol mentioned in |
| 1823 | # the 'backing file format' with 'raw', rather than storing the |
| 1824 | # protocol name as the backing format. Can be used even when no |
| 1825 | # image header will be updated (default false; since 9.0). |
Peter Krempa | 4b028cb | 2023-12-05 18:14:41 +0100 | [diff] [blame] | 1826 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 1827 | # @speed: the maximum speed, in bytes per second |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1828 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1829 | # @on-error: the action to take on an error. 'ignore' means that the |
| 1830 | # request should be retried. (default: report; Since: 5.0) |
Kevin Wolf | 8faad1c | 2020-02-14 21:08:11 +0100 | [diff] [blame] | 1831 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 1832 | # @filter-node-name: the node name that should be assigned to the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1833 | # filter driver that the commit job inserts into the graph above |
| 1834 | # @top. If this option is not given, a node name is |
| 1835 | # autogenerated. (Since: 2.9) |
Kevin Wolf | 0db832f | 2017-02-20 18:10:05 +0100 | [diff] [blame] | 1836 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1837 | # @auto-finalize: When false, this job will wait in a PENDING state |
| 1838 | # after it has finished its work, waiting for @block-job-finalize |
| 1839 | # before making any block graph changes. When true, this job will |
| 1840 | # automatically perform its abort or commit actions. Defaults to |
| 1841 | # true. (Since 3.1) |
John Snow | 96fbf53 | 2018-09-06 09:02:21 -0400 | [diff] [blame] | 1842 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1843 | # @auto-dismiss: When false, this job will wait in a CONCLUDED state |
| 1844 | # after it has completely ceased all work, and awaits |
| 1845 | # @block-job-dismiss. When true, this job will automatically |
| 1846 | # disappear from the query list without user intervention. |
| 1847 | # Defaults to true. (Since 3.1) |
John Snow | 96fbf53 | 2018-09-06 09:02:21 -0400 | [diff] [blame] | 1848 | # |
Markus Armbruster | df4097a | 2020-03-17 12:54:51 +0100 | [diff] [blame] | 1849 | # Features: |
Markus Armbruster | df4097a | 2020-03-17 12:54:51 +0100 | [diff] [blame] | 1850 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1851 | # @deprecated: Members @base and @top are deprecated. Use @base-node |
| 1852 | # and @top-node instead. |
| 1853 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 1854 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1855 | # - If @device does not exist, DeviceNotFound |
| 1856 | # - Any other error returns a GenericError. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1857 | # |
| 1858 | # Since: 1.3 |
| 1859 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 1860 | # .. qmp-example:: |
Marc-André Lureau | f44fb58 | 2016-06-23 14:10:29 +0200 | [diff] [blame] | 1861 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 1862 | # -> { "execute": "block-commit", |
| 1863 | # "arguments": { "device": "virtio0", |
| 1864 | # "top": "/tmp/snap1.qcow2" } } |
| 1865 | # <- { "return": {} } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1866 | ## |
| 1867 | { 'command': 'block-commit', |
Kevin Wolf | 3c605f4 | 2017-06-27 17:18:20 +0200 | [diff] [blame] | 1868 | 'data': { '*job-id': 'str', 'device': 'str', '*base-node': 'str', |
Markus Armbruster | df4097a | 2020-03-17 12:54:51 +0100 | [diff] [blame] | 1869 | '*base': { 'type': 'str', 'features': [ 'deprecated' ] }, |
| 1870 | '*top-node': 'str', |
| 1871 | '*top': { 'type': 'str', 'features': [ 'deprecated' ] }, |
Peter Krempa | 4b028cb | 2023-12-05 18:14:41 +0100 | [diff] [blame] | 1872 | '*backing-file': 'str', '*backing-mask-protocol': 'bool', |
| 1873 | '*speed': 'int', |
Kevin Wolf | 8faad1c | 2020-02-14 21:08:11 +0100 | [diff] [blame] | 1874 | '*on-error': 'BlockdevOnError', |
John Snow | 96fbf53 | 2018-09-06 09:02:21 -0400 | [diff] [blame] | 1875 | '*filter-node-name': 'str', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 1876 | '*auto-finalize': 'bool', '*auto-dismiss': 'bool' }, |
| 1877 | 'allow-preconfig': true } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1878 | |
| 1879 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 1880 | # @drive-backup: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1881 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1882 | # Start a point-in-time copy of a block device to a new destination. |
| 1883 | # The status of ongoing drive-backup operations can be checked with |
| 1884 | # query-block-jobs where the BlockJobInfo.type field has the value |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 1885 | # 'backup'. The operation can be stopped before it has completed |
| 1886 | # using the block-job-cancel command. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1887 | # |
Vladimir Sementsov-Ogievskiy | 1084159 | 2021-11-04 09:58:11 +0100 | [diff] [blame] | 1888 | # Features: |
Vladimir Sementsov-Ogievskiy | 1084159 | 2021-11-04 09:58:11 +0100 | [diff] [blame] | 1889 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1890 | # @deprecated: This command is deprecated. Use @blockdev-backup |
| 1891 | # instead. |
| 1892 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 1893 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1894 | # - If @device is not a valid block device, GenericError |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1895 | # |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 1896 | # Since: 1.6 |
Marc-André Lureau | b033641 | 2016-06-23 14:11:47 +0200 | [diff] [blame] | 1897 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 1898 | # .. qmp-example:: |
Marc-André Lureau | b033641 | 2016-06-23 14:11:47 +0200 | [diff] [blame] | 1899 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 1900 | # -> { "execute": "drive-backup", |
| 1901 | # "arguments": { "device": "drive0", |
| 1902 | # "sync": "full", |
| 1903 | # "target": "backup.img" } } |
| 1904 | # <- { "return": {} } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1905 | ## |
Pavel Butsykin | 81206a8 | 2016-07-22 11:17:50 +0300 | [diff] [blame] | 1906 | { 'command': 'drive-backup', 'boxed': true, |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 1907 | 'data': 'DriveBackup', 'features': ['deprecated'], |
| 1908 | 'allow-preconfig': true } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1909 | |
| 1910 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 1911 | # @blockdev-backup: |
Fam Zheng | c29c1dd | 2014-12-18 18:37:05 +0800 | [diff] [blame] | 1912 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1913 | # Start a point-in-time copy of a block device to a new destination. |
| 1914 | # The status of ongoing blockdev-backup operations can be checked with |
| 1915 | # query-block-jobs where the BlockJobInfo.type field has the value |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 1916 | # 'backup'. The operation can be stopped before it has completed |
| 1917 | # using the block-job-cancel command. |
Fam Zheng | c29c1dd | 2014-12-18 18:37:05 +0800 | [diff] [blame] | 1918 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 1919 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1920 | # - If @device is not a valid block device, DeviceNotFound |
Pavel Butsykin | dc7a4a9 | 2016-07-22 11:17:51 +0300 | [diff] [blame] | 1921 | # |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 1922 | # Since: 2.3 |
Marc-André Lureau | 1cf7511 | 2016-06-23 14:13:07 +0200 | [diff] [blame] | 1923 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 1924 | # .. qmp-example:: |
Andrea Bolognani | 4ae65a5 | 2022-05-03 09:37:32 +0200 | [diff] [blame] | 1925 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 1926 | # -> { "execute": "blockdev-backup", |
| 1927 | # "arguments": { "device": "src-id", |
| 1928 | # "sync": "full", |
| 1929 | # "target": "tgt-id" } } |
| 1930 | # <- { "return": {} } |
Fam Zheng | c29c1dd | 2014-12-18 18:37:05 +0800 | [diff] [blame] | 1931 | ## |
Pavel Butsykin | dc7a4a9 | 2016-07-22 11:17:51 +0300 | [diff] [blame] | 1932 | { 'command': 'blockdev-backup', 'boxed': true, |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 1933 | 'data': 'BlockdevBackup', |
| 1934 | 'allow-preconfig': true } |
Fam Zheng | c29c1dd | 2014-12-18 18:37:05 +0800 | [diff] [blame] | 1935 | |
Fam Zheng | c29c1dd | 2014-12-18 18:37:05 +0800 | [diff] [blame] | 1936 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 1937 | # @query-named-block-nodes: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1938 | # |
| 1939 | # Get the named block driver list |
| 1940 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 1941 | # @flat: Omit the nested data about backing image ("backing-image" |
| 1942 | # key) if true. Default is false (Since 5.0) |
Peter Krempa | facda54 | 2020-01-20 09:50:49 +0100 | [diff] [blame] | 1943 | # |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1944 | # Returns: the list of BlockDeviceInfo |
| 1945 | # |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 1946 | # Since: 2.0 |
Marc-André Lureau | e1f34cb | 2016-06-23 14:13:48 +0200 | [diff] [blame] | 1947 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 1948 | # .. qmp-example:: |
Marc-André Lureau | e1f34cb | 2016-06-23 14:13:48 +0200 | [diff] [blame] | 1949 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 1950 | # -> { "execute": "query-named-block-nodes" } |
| 1951 | # <- { "return": [ { "ro":false, |
| 1952 | # "drv":"qcow2", |
| 1953 | # "encrypted":false, |
| 1954 | # "file":"disks/test.qcow2", |
| 1955 | # "node-name": "my-node", |
| 1956 | # "backing_file_depth":1, |
| 1957 | # "detect_zeroes":"off", |
| 1958 | # "bps":1000000, |
| 1959 | # "bps_rd":0, |
| 1960 | # "bps_wr":0, |
| 1961 | # "iops":1000000, |
| 1962 | # "iops_rd":0, |
| 1963 | # "iops_wr":0, |
| 1964 | # "bps_max": 8000000, |
| 1965 | # "bps_rd_max": 0, |
| 1966 | # "bps_wr_max": 0, |
| 1967 | # "iops_max": 0, |
| 1968 | # "iops_rd_max": 0, |
| 1969 | # "iops_wr_max": 0, |
| 1970 | # "iops_size": 0, |
| 1971 | # "write_threshold": 0, |
| 1972 | # "image":{ |
| 1973 | # "filename":"disks/test.qcow2", |
Marc-André Lureau | e1f34cb | 2016-06-23 14:13:48 +0200 | [diff] [blame] | 1974 | # "format":"qcow2", |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 1975 | # "virtual-size":2048000, |
| 1976 | # "backing_file":"base.qcow2", |
| 1977 | # "full-backing-filename":"disks/base.qcow2", |
| 1978 | # "backing-filename-format":"qcow2", |
| 1979 | # "snapshots":[ |
| 1980 | # { |
| 1981 | # "id": "1", |
| 1982 | # "name": "snapshot1", |
| 1983 | # "vm-state-size": 0, |
| 1984 | # "date-sec": 10000200, |
| 1985 | # "date-nsec": 12, |
| 1986 | # "vm-clock-sec": 206, |
| 1987 | # "vm-clock-nsec": 30 |
| 1988 | # } |
| 1989 | # ], |
| 1990 | # "backing-image":{ |
| 1991 | # "filename":"disks/base.qcow2", |
| 1992 | # "format":"qcow2", |
| 1993 | # "virtual-size":2048000 |
| 1994 | # } |
| 1995 | # } } ] } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 1996 | ## |
Peter Krempa | facda54 | 2020-01-20 09:50:49 +0100 | [diff] [blame] | 1997 | { 'command': 'query-named-block-nodes', |
| 1998 | 'returns': [ 'BlockDeviceInfo' ], |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 1999 | 'data': { '*flat': 'bool' }, |
| 2000 | 'allow-preconfig': true } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2001 | |
| 2002 | ## |
Vladimir Sementsov-Ogievskiy | 5d3b4e9 | 2018-12-21 20:09:07 +0300 | [diff] [blame] | 2003 | # @XDbgBlockGraphNodeType: |
| 2004 | # |
| 2005 | # @block-backend: corresponds to BlockBackend |
| 2006 | # |
zhaolichang | 2400e50 | 2020-09-17 15:50:28 +0800 | [diff] [blame] | 2007 | # @block-job: corresponds to BlockJob |
Vladimir Sementsov-Ogievskiy | 5d3b4e9 | 2018-12-21 20:09:07 +0300 | [diff] [blame] | 2008 | # |
| 2009 | # @block-driver: corresponds to BlockDriverState |
| 2010 | # |
| 2011 | # Since: 4.0 |
| 2012 | ## |
| 2013 | { 'enum': 'XDbgBlockGraphNodeType', |
| 2014 | 'data': [ 'block-backend', 'block-job', 'block-driver' ] } |
| 2015 | |
| 2016 | ## |
| 2017 | # @XDbgBlockGraphNode: |
| 2018 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2019 | # @id: Block graph node identifier. This @id is generated only for |
| 2020 | # x-debug-query-block-graph and does not relate to any other |
| 2021 | # identifiers in Qemu. |
Vladimir Sementsov-Ogievskiy | 5d3b4e9 | 2018-12-21 20:09:07 +0300 | [diff] [blame] | 2022 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2023 | # @type: Type of graph node. Can be one of block-backend, block-job |
| 2024 | # or block-driver-state. |
Vladimir Sementsov-Ogievskiy | 5d3b4e9 | 2018-12-21 20:09:07 +0300 | [diff] [blame] | 2025 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2026 | # @name: Human readable name of the node. Corresponds to node-name |
| 2027 | # for block-driver-state nodes; is not guaranteed to be unique in |
| 2028 | # the whole graph (with block-jobs and block-backends). |
Vladimir Sementsov-Ogievskiy | 5d3b4e9 | 2018-12-21 20:09:07 +0300 | [diff] [blame] | 2029 | # |
| 2030 | # Since: 4.0 |
| 2031 | ## |
| 2032 | { 'struct': 'XDbgBlockGraphNode', |
| 2033 | 'data': { 'id': 'uint64', 'type': 'XDbgBlockGraphNodeType', 'name': 'str' } } |
| 2034 | |
| 2035 | ## |
| 2036 | # @BlockPermission: |
| 2037 | # |
| 2038 | # Enum of base block permissions. |
| 2039 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2040 | # @consistent-read: A user that has the "permission" of consistent |
| 2041 | # reads is guaranteed that their view of the contents of the block |
| 2042 | # device is complete and self-consistent, representing the |
| 2043 | # contents of a disk at a specific point. For most block devices |
| 2044 | # (including their backing files) this is true, but the property |
| 2045 | # cannot be maintained in a few situations like for intermediate |
| 2046 | # nodes of a commit block job. |
Vladimir Sementsov-Ogievskiy | 5d3b4e9 | 2018-12-21 20:09:07 +0300 | [diff] [blame] | 2047 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2048 | # @write: This permission is required to change the visible disk |
| 2049 | # contents. |
Vladimir Sementsov-Ogievskiy | 5d3b4e9 | 2018-12-21 20:09:07 +0300 | [diff] [blame] | 2050 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2051 | # @write-unchanged: This permission (which is weaker than |
| 2052 | # BLK_PERM_WRITE) is both enough and required for writes to the |
| 2053 | # block node when the caller promises that the visible disk |
| 2054 | # content doesn't change. As the BLK_PERM_WRITE permission is |
| 2055 | # strictly stronger, either is sufficient to perform an unchanging |
| 2056 | # write. |
Vladimir Sementsov-Ogievskiy | 5d3b4e9 | 2018-12-21 20:09:07 +0300 | [diff] [blame] | 2057 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2058 | # @resize: This permission is required to change the size of a block |
| 2059 | # node. |
Vladimir Sementsov-Ogievskiy | 5d3b4e9 | 2018-12-21 20:09:07 +0300 | [diff] [blame] | 2060 | # |
Vladimir Sementsov-Ogievskiy | 5d3b4e9 | 2018-12-21 20:09:07 +0300 | [diff] [blame] | 2061 | # Since: 4.0 |
| 2062 | ## |
Markus Armbruster | fbeed19 | 2020-07-30 11:16:56 +0200 | [diff] [blame] | 2063 | { 'enum': 'BlockPermission', |
Vladimir Sementsov-Ogievskiy | 64631f3 | 2021-09-02 12:37:54 +0300 | [diff] [blame] | 2064 | 'data': [ 'consistent-read', 'write', 'write-unchanged', 'resize' ] } |
| 2065 | |
Vladimir Sementsov-Ogievskiy | 5d3b4e9 | 2018-12-21 20:09:07 +0300 | [diff] [blame] | 2066 | ## |
| 2067 | # @XDbgBlockGraphEdge: |
| 2068 | # |
| 2069 | # Block Graph edge description for x-debug-query-block-graph. |
| 2070 | # |
| 2071 | # @parent: parent id |
| 2072 | # |
| 2073 | # @child: child id |
| 2074 | # |
| 2075 | # @name: name of the relation (examples are 'file' and 'backing') |
| 2076 | # |
| 2077 | # @perm: granted permissions for the parent operating on the child |
| 2078 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2079 | # @shared-perm: permissions that can still be granted to other users |
| 2080 | # of the child while it is still attached to this parent |
Vladimir Sementsov-Ogievskiy | 5d3b4e9 | 2018-12-21 20:09:07 +0300 | [diff] [blame] | 2081 | # |
| 2082 | # Since: 4.0 |
| 2083 | ## |
| 2084 | { 'struct': 'XDbgBlockGraphEdge', |
| 2085 | 'data': { 'parent': 'uint64', 'child': 'uint64', |
| 2086 | 'name': 'str', 'perm': [ 'BlockPermission' ], |
| 2087 | 'shared-perm': [ 'BlockPermission' ] } } |
| 2088 | |
| 2089 | ## |
| 2090 | # @XDbgBlockGraph: |
| 2091 | # |
| 2092 | # Block Graph - list of nodes and list of edges. |
| 2093 | # |
| 2094 | # Since: 4.0 |
| 2095 | ## |
| 2096 | { 'struct': 'XDbgBlockGraph', |
| 2097 | 'data': { 'nodes': ['XDbgBlockGraphNode'], 'edges': ['XDbgBlockGraphEdge'] } } |
| 2098 | |
| 2099 | ## |
| 2100 | # @x-debug-query-block-graph: |
| 2101 | # |
| 2102 | # Get the block graph. |
| 2103 | # |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 2104 | # Features: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2105 | # |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 2106 | # @unstable: This command is meant for debugging. |
| 2107 | # |
Vladimir Sementsov-Ogievskiy | 5d3b4e9 | 2018-12-21 20:09:07 +0300 | [diff] [blame] | 2108 | # Since: 4.0 |
| 2109 | ## |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 2110 | { 'command': 'x-debug-query-block-graph', 'returns': 'XDbgBlockGraph', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 2111 | 'features': [ 'unstable' ], |
| 2112 | 'allow-preconfig': true } |
Vladimir Sementsov-Ogievskiy | 5d3b4e9 | 2018-12-21 20:09:07 +0300 | [diff] [blame] | 2113 | |
| 2114 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 2115 | # @drive-mirror: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2116 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2117 | # Start mirroring a block device's writes to a new destination. |
| 2118 | # target specifies the target of the new image. If the file exists, |
| 2119 | # or if it is a device, it will be used as the new destination for |
Markus Armbruster | aa03e16 | 2024-03-22 15:09:03 +0100 | [diff] [blame] | 2120 | # writes. If it does not exist, a new file will be created. @format |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2121 | # specifies the format of the mirror image, default is to probe if |
| 2122 | # mode='existing', else the format of the source. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2123 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 2124 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2125 | # - If @device is not a valid block device, GenericError |
Eric Blake | faecd40 | 2016-07-14 16:37:58 -0600 | [diff] [blame] | 2126 | # |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 2127 | # Since: 1.3 |
Marc-André Lureau | 12a21b7 | 2016-06-23 14:17:31 +0200 | [diff] [blame] | 2128 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 2129 | # .. qmp-example:: |
Marc-André Lureau | 12a21b7 | 2016-06-23 14:17:31 +0200 | [diff] [blame] | 2130 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 2131 | # -> { "execute": "drive-mirror", |
| 2132 | # "arguments": { "device": "ide-hd0", |
| 2133 | # "target": "/some/place/my-image", |
| 2134 | # "sync": "full", |
| 2135 | # "format": "qcow2" } } |
| 2136 | # <- { "return": {} } |
Eric Blake | faecd40 | 2016-07-14 16:37:58 -0600 | [diff] [blame] | 2137 | ## |
| 2138 | { 'command': 'drive-mirror', 'boxed': true, |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 2139 | 'data': 'DriveMirror', |
| 2140 | 'allow-preconfig': true } |
Eric Blake | faecd40 | 2016-07-14 16:37:58 -0600 | [diff] [blame] | 2141 | |
| 2142 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 2143 | # @DriveMirror: |
Eric Blake | faecd40 | 2016-07-14 16:37:58 -0600 | [diff] [blame] | 2144 | # |
| 2145 | # A set of parameters describing drive mirror setup. |
| 2146 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2147 | # @job-id: identifier for the newly-created block job. If omitted, |
| 2148 | # the device name will be used. (Since 2.7) |
Alberto Garcia | 71aa986 | 2016-07-05 17:28:57 +0300 | [diff] [blame] | 2149 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2150 | # @device: the device name or node-name of a root node whose writes |
| 2151 | # should be mirrored. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2152 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2153 | # @target: the target of the new image. If the file exists, or if it |
| 2154 | # is a device, the existing file/device will be used as the new |
| 2155 | # destination. If it does not exist, a new file will be created. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2156 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2157 | # @format: the format of the new destination, default is to probe if |
| 2158 | # @mode is 'existing', else the format of the source |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2159 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2160 | # @node-name: the new block driver state node name in the graph (Since |
| 2161 | # 2.1) |
Benoît Canet | 4c828dc | 2014-06-16 12:00:55 +0200 | [diff] [blame] | 2162 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 2163 | # @replaces: with sync=full graph node name to be replaced by the new |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2164 | # image when a whole image copy is done. This can be used to |
| 2165 | # repair broken Quorum files. By default, @device is replaced, |
| 2166 | # although implicitly created filters on it are kept. (Since 2.1) |
Benoît Canet | 09158f0 | 2014-06-27 18:25:25 +0200 | [diff] [blame] | 2167 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 2168 | # @mode: whether and how QEMU should create a new image, default is |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2169 | # 'absolute-paths'. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2170 | # |
Andrea Bolognani | 23e4645 | 2022-05-03 09:37:35 +0200 | [diff] [blame] | 2171 | # @speed: the maximum speed, in bytes per second |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2172 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2173 | # @sync: what parts of the disk image should be copied to the |
| 2174 | # destination (all the disk, only the sectors allocated in the |
| 2175 | # topmost image, or only new I/O). |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2176 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2177 | # @granularity: granularity of the dirty bitmap, default is 64K if the |
| 2178 | # image format doesn't have clusters, 4K if the clusters are |
| 2179 | # smaller than that, else the cluster size. Must be a power of 2 |
| 2180 | # between 512 and 64M (since 1.4). |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2181 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2182 | # @buf-size: maximum amount of data in flight from source to target |
| 2183 | # (since 1.4). |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2184 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 2185 | # @on-source-error: the action to take on an error on the source, |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2186 | # default 'report'. 'stop' and 'enospc' can only be used if the |
| 2187 | # block device supports io-status (see BlockInfo). |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2188 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 2189 | # @on-target-error: the action to take on an error on the target, |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2190 | # default 'report' (no limitations, since this applies to a |
| 2191 | # different block device than @device). |
Andrea Bolognani | 4ae65a5 | 2022-05-03 09:37:32 +0200 | [diff] [blame] | 2192 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2193 | # @unmap: Whether to try to unmap target sectors where source has only |
| 2194 | # zero. If true, and target unallocated sectors will read as |
| 2195 | # zero, target image sectors will be unmapped; otherwise, zeroes |
| 2196 | # will be written. Both will result in identical contents. |
| 2197 | # Default is true. (Since 2.4) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2198 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2199 | # @copy-mode: when to copy data to the destination; defaults to |
| 2200 | # 'background' (Since: 3.0) |
Max Reitz | 481deba | 2018-06-13 20:18:22 +0200 | [diff] [blame] | 2201 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2202 | # @auto-finalize: When false, this job will wait in a PENDING state |
| 2203 | # after it has finished its work, waiting for @block-job-finalize |
| 2204 | # before making any block graph changes. When true, this job will |
| 2205 | # automatically perform its abort or commit actions. Defaults to |
| 2206 | # true. (Since 3.1) |
John Snow | a6b58ad | 2018-09-06 09:02:22 -0400 | [diff] [blame] | 2207 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2208 | # @auto-dismiss: When false, this job will wait in a CONCLUDED state |
| 2209 | # after it has completely ceased all work, and awaits |
| 2210 | # @block-job-dismiss. When true, this job will automatically |
| 2211 | # disappear from the query list without user intervention. |
| 2212 | # Defaults to true. (Since 3.1) |
Andrea Bolognani | 4ae65a5 | 2022-05-03 09:37:32 +0200 | [diff] [blame] | 2213 | # |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 2214 | # Since: 1.3 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2215 | ## |
Eric Blake | faecd40 | 2016-07-14 16:37:58 -0600 | [diff] [blame] | 2216 | { 'struct': 'DriveMirror', |
Alberto Garcia | 71aa986 | 2016-07-05 17:28:57 +0300 | [diff] [blame] | 2217 | 'data': { '*job-id': 'str', 'device': 'str', 'target': 'str', |
| 2218 | '*format': 'str', '*node-name': 'str', '*replaces': 'str', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2219 | 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode', |
| 2220 | '*speed': 'int', '*granularity': 'uint32', |
| 2221 | '*buf-size': 'int', '*on-source-error': 'BlockdevOnError', |
Fam Zheng | 0fc9f8e | 2015-06-08 13:56:08 +0800 | [diff] [blame] | 2222 | '*on-target-error': 'BlockdevOnError', |
John Snow | a6b58ad | 2018-09-06 09:02:22 -0400 | [diff] [blame] | 2223 | '*unmap': 'bool', '*copy-mode': 'MirrorCopyMode', |
| 2224 | '*auto-finalize': 'bool', '*auto-dismiss': 'bool' } } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2225 | |
| 2226 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 2227 | # @BlockDirtyBitmap: |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2228 | # |
| 2229 | # @node: name of device/node which the bitmap is tracking |
| 2230 | # |
| 2231 | # @name: name of the dirty bitmap |
| 2232 | # |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 2233 | # Since: 2.4 |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2234 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 2235 | { 'struct': 'BlockDirtyBitmap', |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2236 | 'data': { 'node': 'str', 'name': 'str' } } |
| 2237 | |
| 2238 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 2239 | # @BlockDirtyBitmapAdd: |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2240 | # |
| 2241 | # @node: name of device/node which the bitmap is tracking |
| 2242 | # |
Eric Blake | cf7c49c | 2019-11-13 20:46:33 -0600 | [diff] [blame] | 2243 | # @name: name of the dirty bitmap (must be less than 1024 bytes) |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2244 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 2245 | # @granularity: the bitmap granularity, default is 64k for |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2246 | # block-dirty-bitmap-add |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2247 | # |
Vladimir Sementsov-Ogievskiy | fd5ae4c | 2017-06-28 15:05:23 +0300 | [diff] [blame] | 2248 | # @persistent: the bitmap is persistent, i.e. it will be saved to the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2249 | # corresponding block device image file on its close. For now |
| 2250 | # only Qcow2 disks support persistent bitmaps. Default is false |
| 2251 | # for block-dirty-bitmap-add. (Since: 2.10) |
Vladimir Sementsov-Ogievskiy | fd5ae4c | 2017-06-28 15:05:23 +0300 | [diff] [blame] | 2252 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2253 | # @disabled: the bitmap is created in the disabled state, which means |
| 2254 | # that it will not track drive changes. The bitmap may be enabled |
| 2255 | # with block-dirty-bitmap-enable. Default is false. (Since: 4.0) |
Vladimir Sementsov-Ogievskiy | a6e2ca5 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2256 | # |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 2257 | # Since: 2.4 |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2258 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 2259 | { 'struct': 'BlockDirtyBitmapAdd', |
Vladimir Sementsov-Ogievskiy | fd5ae4c | 2017-06-28 15:05:23 +0300 | [diff] [blame] | 2260 | 'data': { 'node': 'str', 'name': 'str', '*granularity': 'uint32', |
John Snow | 3264ffc | 2019-10-02 19:24:11 -0400 | [diff] [blame] | 2261 | '*persistent': 'bool', '*disabled': 'bool' } } |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2262 | |
| 2263 | ## |
Vladimir Sementsov-Ogievskiy | 1466ef6 | 2022-03-15 00:32:24 +0300 | [diff] [blame] | 2264 | # @BlockDirtyBitmapOrStr: |
Vladimir Sementsov-Ogievskiy | eff0829 | 2019-05-28 19:33:31 -0400 | [diff] [blame] | 2265 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2266 | # @local: name of the bitmap, attached to the same node as target |
| 2267 | # bitmap. |
Vladimir Sementsov-Ogievskiy | eff0829 | 2019-05-28 19:33:31 -0400 | [diff] [blame] | 2268 | # |
| 2269 | # @external: bitmap with specified node |
| 2270 | # |
| 2271 | # Since: 4.1 |
| 2272 | ## |
Vladimir Sementsov-Ogievskiy | 1466ef6 | 2022-03-15 00:32:24 +0300 | [diff] [blame] | 2273 | { 'alternate': 'BlockDirtyBitmapOrStr', |
Vladimir Sementsov-Ogievskiy | eff0829 | 2019-05-28 19:33:31 -0400 | [diff] [blame] | 2274 | 'data': { 'local': 'str', |
| 2275 | 'external': 'BlockDirtyBitmap' } } |
| 2276 | |
| 2277 | ## |
Vladimir Sementsov-Ogievskiy | b598e53 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2278 | # @BlockDirtyBitmapMerge: |
| 2279 | # |
Vladimir Sementsov-Ogievskiy | eff0829 | 2019-05-28 19:33:31 -0400 | [diff] [blame] | 2280 | # @node: name of device/node which the @target bitmap is tracking |
Vladimir Sementsov-Ogievskiy | b598e53 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2281 | # |
John Snow | 360d4e4 | 2018-12-21 04:35:21 -0500 | [diff] [blame] | 2282 | # @target: name of the destination dirty bitmap |
Vladimir Sementsov-Ogievskiy | b598e53 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2283 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2284 | # @bitmaps: name(s) of the source dirty bitmap(s) at @node and/or |
| 2285 | # fully specified BlockDirtyBitmap elements. The latter are |
| 2286 | # supported since 4.1. |
Vladimir Sementsov-Ogievskiy | b598e53 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2287 | # |
John Snow | 0e2b7f0 | 2018-12-21 04:35:22 -0500 | [diff] [blame] | 2288 | # Since: 4.0 |
Vladimir Sementsov-Ogievskiy | b598e53 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2289 | ## |
| 2290 | { 'struct': 'BlockDirtyBitmapMerge', |
Vladimir Sementsov-Ogievskiy | eff0829 | 2019-05-28 19:33:31 -0400 | [diff] [blame] | 2291 | 'data': { 'node': 'str', 'target': 'str', |
Vladimir Sementsov-Ogievskiy | 1466ef6 | 2022-03-15 00:32:24 +0300 | [diff] [blame] | 2292 | 'bitmaps': ['BlockDirtyBitmapOrStr'] } } |
Vladimir Sementsov-Ogievskiy | b598e53 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2293 | |
| 2294 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 2295 | # @block-dirty-bitmap-add: |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2296 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2297 | # Create a dirty bitmap with a name on the node, and start tracking |
| 2298 | # the writes. |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2299 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 2300 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2301 | # - If @node is not a valid block device or node, DeviceNotFound |
| 2302 | # - If @name is already taken, GenericError with an explanation |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2303 | # |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 2304 | # Since: 2.4 |
Marc-André Lureau | 2258a5d | 2016-06-23 14:19:37 +0200 | [diff] [blame] | 2305 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 2306 | # .. qmp-example:: |
Marc-André Lureau | 2258a5d | 2016-06-23 14:19:37 +0200 | [diff] [blame] | 2307 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 2308 | # -> { "execute": "block-dirty-bitmap-add", |
| 2309 | # "arguments": { "node": "drive0", "name": "bitmap0" } } |
| 2310 | # <- { "return": {} } |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2311 | ## |
| 2312 | { 'command': 'block-dirty-bitmap-add', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 2313 | 'data': 'BlockDirtyBitmapAdd', |
| 2314 | 'allow-preconfig': true } |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2315 | |
| 2316 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 2317 | # @block-dirty-bitmap-remove: |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2318 | # |
Marc-André Lureau | 4bbca42 | 2016-06-23 14:23:39 +0200 | [diff] [blame] | 2319 | # Stop write tracking and remove the dirty bitmap that was created |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2320 | # with block-dirty-bitmap-add. If the bitmap is persistent, remove it |
| 2321 | # from its storage too. |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2322 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 2323 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2324 | # - If @node is not a valid block device or node, DeviceNotFound |
| 2325 | # - If @name is not found, GenericError with an explanation |
| 2326 | # - if @name is frozen by an operation, GenericError |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2327 | # |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 2328 | # Since: 2.4 |
Marc-André Lureau | 4bbca42 | 2016-06-23 14:23:39 +0200 | [diff] [blame] | 2329 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 2330 | # .. qmp-example:: |
Marc-André Lureau | 4bbca42 | 2016-06-23 14:23:39 +0200 | [diff] [blame] | 2331 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 2332 | # -> { "execute": "block-dirty-bitmap-remove", |
| 2333 | # "arguments": { "node": "drive0", "name": "bitmap0" } } |
| 2334 | # <- { "return": {} } |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2335 | ## |
| 2336 | { 'command': 'block-dirty-bitmap-remove', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 2337 | 'data': 'BlockDirtyBitmap', |
| 2338 | 'allow-preconfig': true } |
John Snow | 341ebc2 | 2015-04-17 19:49:52 -0400 | [diff] [blame] | 2339 | |
| 2340 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 2341 | # @block-dirty-bitmap-clear: |
John Snow | e74e6b7 | 2015-04-17 19:49:59 -0400 | [diff] [blame] | 2342 | # |
Marc-André Lureau | 73dffdc | 2016-06-23 14:25:54 +0200 | [diff] [blame] | 2343 | # Clear (reset) a dirty bitmap on the device, so that an incremental |
| 2344 | # backup from this point in time forward will only backup clusters |
| 2345 | # modified after this clear operation. |
John Snow | e74e6b7 | 2015-04-17 19:49:59 -0400 | [diff] [blame] | 2346 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 2347 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2348 | # - If @node is not a valid block device, DeviceNotFound |
| 2349 | # - If @name is not found, GenericError with an explanation |
John Snow | e74e6b7 | 2015-04-17 19:49:59 -0400 | [diff] [blame] | 2350 | # |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 2351 | # Since: 2.4 |
Marc-André Lureau | 73dffdc | 2016-06-23 14:25:54 +0200 | [diff] [blame] | 2352 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 2353 | # .. qmp-example:: |
Marc-André Lureau | 73dffdc | 2016-06-23 14:25:54 +0200 | [diff] [blame] | 2354 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 2355 | # -> { "execute": "block-dirty-bitmap-clear", |
| 2356 | # "arguments": { "node": "drive0", "name": "bitmap0" } } |
| 2357 | # <- { "return": {} } |
John Snow | e74e6b7 | 2015-04-17 19:49:59 -0400 | [diff] [blame] | 2358 | ## |
| 2359 | { 'command': 'block-dirty-bitmap-clear', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 2360 | 'data': 'BlockDirtyBitmap', |
| 2361 | 'allow-preconfig': true } |
John Snow | e74e6b7 | 2015-04-17 19:49:59 -0400 | [diff] [blame] | 2362 | |
| 2363 | ## |
John Snow | 0e2b7f0 | 2018-12-21 04:35:22 -0500 | [diff] [blame] | 2364 | # @block-dirty-bitmap-enable: |
Vladimir Sementsov-Ogievskiy | 5c5d2e5 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2365 | # |
| 2366 | # Enables a dirty bitmap so that it will begin tracking disk changes. |
| 2367 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 2368 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2369 | # - If @node is not a valid block device, DeviceNotFound |
| 2370 | # - If @name is not found, GenericError with an explanation |
Vladimir Sementsov-Ogievskiy | 5c5d2e5 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2371 | # |
John Snow | 0e2b7f0 | 2018-12-21 04:35:22 -0500 | [diff] [blame] | 2372 | # Since: 4.0 |
Vladimir Sementsov-Ogievskiy | 5c5d2e5 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2373 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 2374 | # .. qmp-example:: |
Vladimir Sementsov-Ogievskiy | 5c5d2e5 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2375 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 2376 | # -> { "execute": "block-dirty-bitmap-enable", |
| 2377 | # "arguments": { "node": "drive0", "name": "bitmap0" } } |
| 2378 | # <- { "return": {} } |
Vladimir Sementsov-Ogievskiy | 5c5d2e5 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2379 | ## |
Markus Armbruster | fbeed19 | 2020-07-30 11:16:56 +0200 | [diff] [blame] | 2380 | { 'command': 'block-dirty-bitmap-enable', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 2381 | 'data': 'BlockDirtyBitmap', |
| 2382 | 'allow-preconfig': true } |
Vladimir Sementsov-Ogievskiy | 5c5d2e5 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2383 | |
| 2384 | ## |
John Snow | 0e2b7f0 | 2018-12-21 04:35:22 -0500 | [diff] [blame] | 2385 | # @block-dirty-bitmap-disable: |
Vladimir Sementsov-Ogievskiy | 5c5d2e5 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2386 | # |
| 2387 | # Disables a dirty bitmap so that it will stop tracking disk changes. |
| 2388 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 2389 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2390 | # - If @node is not a valid block device, DeviceNotFound |
| 2391 | # - If @name is not found, GenericError with an explanation |
Vladimir Sementsov-Ogievskiy | 5c5d2e5 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2392 | # |
John Snow | 0e2b7f0 | 2018-12-21 04:35:22 -0500 | [diff] [blame] | 2393 | # Since: 4.0 |
Vladimir Sementsov-Ogievskiy | 5c5d2e5 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2394 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 2395 | # .. qmp-example:: |
Vladimir Sementsov-Ogievskiy | 5c5d2e5 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2396 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 2397 | # -> { "execute": "block-dirty-bitmap-disable", |
| 2398 | # "arguments": { "node": "drive0", "name": "bitmap0" } } |
| 2399 | # <- { "return": {} } |
Vladimir Sementsov-Ogievskiy | 5c5d2e5 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2400 | ## |
Markus Armbruster | fbeed19 | 2020-07-30 11:16:56 +0200 | [diff] [blame] | 2401 | { 'command': 'block-dirty-bitmap-disable', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 2402 | 'data': 'BlockDirtyBitmap', |
| 2403 | 'allow-preconfig': true } |
Vladimir Sementsov-Ogievskiy | 5c5d2e5 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2404 | |
| 2405 | ## |
John Snow | 0e2b7f0 | 2018-12-21 04:35:22 -0500 | [diff] [blame] | 2406 | # @block-dirty-bitmap-merge: |
Vladimir Sementsov-Ogievskiy | b598e53 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2407 | # |
John Snow | 360d4e4 | 2018-12-21 04:35:21 -0500 | [diff] [blame] | 2408 | # Merge dirty bitmaps listed in @bitmaps to the @target dirty bitmap. |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2409 | # Dirty bitmaps in @bitmaps will be unchanged, except if it also |
| 2410 | # appears as the @target bitmap. Any bits already set in @target will |
| 2411 | # still be set after the merge, i.e., this operation does not clear |
| 2412 | # the target. On error, @target is unchanged. |
Vladimir Sementsov-Ogievskiy | b598e53 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2413 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2414 | # The resulting bitmap will count as dirty any clusters that were |
| 2415 | # dirty in any of the source bitmaps. This can be used to achieve |
| 2416 | # backup checkpoints, or in simpler usages, to copy bitmaps. |
John Snow | 73ab5d6 | 2019-02-19 17:49:43 -0500 | [diff] [blame] | 2417 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 2418 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2419 | # - If @node is not a valid block device, DeviceNotFound |
| 2420 | # - If any bitmap in @bitmaps or @target is not found, |
| 2421 | # GenericError |
| 2422 | # - If any of the bitmaps have different sizes or granularities, |
| 2423 | # GenericError |
Vladimir Sementsov-Ogievskiy | b598e53 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2424 | # |
John Snow | 0e2b7f0 | 2018-12-21 04:35:22 -0500 | [diff] [blame] | 2425 | # Since: 4.0 |
Vladimir Sementsov-Ogievskiy | b598e53 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2426 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 2427 | # .. qmp-example:: |
Vladimir Sementsov-Ogievskiy | b598e53 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2428 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 2429 | # -> { "execute": "block-dirty-bitmap-merge", |
| 2430 | # "arguments": { "node": "drive0", "target": "bitmap0", |
| 2431 | # "bitmaps": ["bitmap1"] } } |
| 2432 | # <- { "return": {} } |
Vladimir Sementsov-Ogievskiy | b598e53 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2433 | ## |
Markus Armbruster | fbeed19 | 2020-07-30 11:16:56 +0200 | [diff] [blame] | 2434 | { 'command': 'block-dirty-bitmap-merge', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 2435 | 'data': 'BlockDirtyBitmapMerge', |
| 2436 | 'allow-preconfig': true } |
Vladimir Sementsov-Ogievskiy | b598e53 | 2018-06-11 14:53:32 -0400 | [diff] [blame] | 2437 | |
| 2438 | ## |
Vladimir Sementsov-Ogievskiy | a3b5253 | 2017-06-28 15:05:25 +0300 | [diff] [blame] | 2439 | # @BlockDirtyBitmapSha256: |
| 2440 | # |
| 2441 | # SHA256 hash of dirty bitmap data |
| 2442 | # |
| 2443 | # @sha256: ASCII representation of SHA256 bitmap hash |
| 2444 | # |
| 2445 | # Since: 2.10 |
| 2446 | ## |
Markus Armbruster | fbeed19 | 2020-07-30 11:16:56 +0200 | [diff] [blame] | 2447 | { 'struct': 'BlockDirtyBitmapSha256', |
| 2448 | 'data': {'sha256': 'str'} } |
Vladimir Sementsov-Ogievskiy | a3b5253 | 2017-06-28 15:05:25 +0300 | [diff] [blame] | 2449 | |
| 2450 | ## |
| 2451 | # @x-debug-block-dirty-bitmap-sha256: |
| 2452 | # |
John Snow | 73ab5d6 | 2019-02-19 17:49:43 -0500 | [diff] [blame] | 2453 | # Get bitmap SHA256. |
Vladimir Sementsov-Ogievskiy | a3b5253 | 2017-06-28 15:05:25 +0300 | [diff] [blame] | 2454 | # |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 2455 | # Features: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2456 | # |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 2457 | # @unstable: This command is meant for debugging. |
| 2458 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2459 | # Returns: |
Markus Armbruster | e2c1dcb | 2024-02-27 12:39:14 +0100 | [diff] [blame] | 2460 | # BlockDirtyBitmapSha256 |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 2461 | # |
| 2462 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2463 | # - If @node is not a valid block device, DeviceNotFound |
| 2464 | # - If @name is not found or if hashing has failed, GenericError |
| 2465 | # with an explanation |
Vladimir Sementsov-Ogievskiy | a3b5253 | 2017-06-28 15:05:25 +0300 | [diff] [blame] | 2466 | # |
| 2467 | # Since: 2.10 |
| 2468 | ## |
Markus Armbruster | fbeed19 | 2020-07-30 11:16:56 +0200 | [diff] [blame] | 2469 | { 'command': 'x-debug-block-dirty-bitmap-sha256', |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 2470 | 'data': 'BlockDirtyBitmap', 'returns': 'BlockDirtyBitmapSha256', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 2471 | 'features': [ 'unstable' ], |
| 2472 | 'allow-preconfig': true } |
Vladimir Sementsov-Ogievskiy | a3b5253 | 2017-06-28 15:05:25 +0300 | [diff] [blame] | 2473 | |
| 2474 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 2475 | # @blockdev-mirror: |
Fam Zheng | df92562 | 2015-12-24 12:45:05 +0800 | [diff] [blame] | 2476 | # |
| 2477 | # Start mirroring a block device's writes to a new destination. |
| 2478 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2479 | # @job-id: identifier for the newly-created block job. If omitted, |
| 2480 | # the device name will be used. (Since 2.7) |
Alberto Garcia | 71aa986 | 2016-07-05 17:28:57 +0300 | [diff] [blame] | 2481 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2482 | # @device: The device name or node-name of a root node whose writes |
| 2483 | # should be mirrored. |
Fam Zheng | df92562 | 2015-12-24 12:45:05 +0800 | [diff] [blame] | 2484 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2485 | # @target: the id or node-name of the block device to mirror to. This |
| 2486 | # mustn't be attached to guest. |
Fam Zheng | df92562 | 2015-12-24 12:45:05 +0800 | [diff] [blame] | 2487 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 2488 | # @replaces: with sync=full graph node name to be replaced by the new |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2489 | # image when a whole image copy is done. This can be used to |
| 2490 | # repair broken Quorum files. By default, @device is replaced, |
| 2491 | # although implicitly created filters on it are kept. |
Fam Zheng | df92562 | 2015-12-24 12:45:05 +0800 | [diff] [blame] | 2492 | # |
Andrea Bolognani | 23e4645 | 2022-05-03 09:37:35 +0200 | [diff] [blame] | 2493 | # @speed: the maximum speed, in bytes per second |
Fam Zheng | df92562 | 2015-12-24 12:45:05 +0800 | [diff] [blame] | 2494 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2495 | # @sync: what parts of the disk image should be copied to the |
| 2496 | # destination (all the disk, only the sectors allocated in the |
| 2497 | # topmost image, or only new I/O). |
Fam Zheng | df92562 | 2015-12-24 12:45:05 +0800 | [diff] [blame] | 2498 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2499 | # @granularity: granularity of the dirty bitmap, default is 64K if the |
| 2500 | # image format doesn't have clusters, 4K if the clusters are |
| 2501 | # smaller than that, else the cluster size. Must be a power of 2 |
| 2502 | # between 512 and 64M |
Fam Zheng | df92562 | 2015-12-24 12:45:05 +0800 | [diff] [blame] | 2503 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2504 | # @buf-size: maximum amount of data in flight from source to target |
Fam Zheng | df92562 | 2015-12-24 12:45:05 +0800 | [diff] [blame] | 2505 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 2506 | # @on-source-error: the action to take on an error on the source, |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2507 | # default 'report'. 'stop' and 'enospc' can only be used if the |
| 2508 | # block device supports io-status (see BlockInfo). |
Fam Zheng | df92562 | 2015-12-24 12:45:05 +0800 | [diff] [blame] | 2509 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 2510 | # @on-target-error: the action to take on an error on the target, |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2511 | # default 'report' (no limitations, since this applies to a |
| 2512 | # different block device than @device). |
Fam Zheng | df92562 | 2015-12-24 12:45:05 +0800 | [diff] [blame] | 2513 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 2514 | # @filter-node-name: the node name that should be assigned to the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2515 | # filter driver that the mirror job inserts into the graph above |
| 2516 | # @device. If this option is not given, a node name is |
| 2517 | # autogenerated. (Since: 2.9) |
Kevin Wolf | 6cdbceb | 2017-02-20 18:10:05 +0100 | [diff] [blame] | 2518 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2519 | # @copy-mode: when to copy data to the destination; defaults to |
| 2520 | # 'background' (Since: 3.0) |
Max Reitz | 481deba | 2018-06-13 20:18:22 +0200 | [diff] [blame] | 2521 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2522 | # @auto-finalize: When false, this job will wait in a PENDING state |
| 2523 | # after it has finished its work, waiting for @block-job-finalize |
| 2524 | # before making any block graph changes. When true, this job will |
| 2525 | # automatically perform its abort or commit actions. Defaults to |
| 2526 | # true. (Since 3.1) |
John Snow | a6b58ad | 2018-09-06 09:02:22 -0400 | [diff] [blame] | 2527 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2528 | # @auto-dismiss: When false, this job will wait in a CONCLUDED state |
| 2529 | # after it has completely ceased all work, and awaits |
| 2530 | # @block-job-dismiss. When true, this job will automatically |
| 2531 | # disappear from the query list without user intervention. |
| 2532 | # Defaults to true. (Since 3.1) |
Andrea Bolognani | 4ae65a5 | 2022-05-03 09:37:32 +0200 | [diff] [blame] | 2533 | # |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 2534 | # Since: 2.6 |
Marc-André Lureau | f6235a2 | 2016-06-23 15:32:39 +0200 | [diff] [blame] | 2535 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 2536 | # .. qmp-example:: |
Marc-André Lureau | f6235a2 | 2016-06-23 15:32:39 +0200 | [diff] [blame] | 2537 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 2538 | # -> { "execute": "blockdev-mirror", |
| 2539 | # "arguments": { "device": "ide-hd0", |
| 2540 | # "target": "target0", |
| 2541 | # "sync": "full" } } |
| 2542 | # <- { "return": {} } |
Fam Zheng | df92562 | 2015-12-24 12:45:05 +0800 | [diff] [blame] | 2543 | ## |
| 2544 | { 'command': 'blockdev-mirror', |
Alberto Garcia | 71aa986 | 2016-07-05 17:28:57 +0300 | [diff] [blame] | 2545 | 'data': { '*job-id': 'str', 'device': 'str', 'target': 'str', |
Fam Zheng | df92562 | 2015-12-24 12:45:05 +0800 | [diff] [blame] | 2546 | '*replaces': 'str', |
| 2547 | 'sync': 'MirrorSyncMode', |
| 2548 | '*speed': 'int', '*granularity': 'uint32', |
| 2549 | '*buf-size': 'int', '*on-source-error': 'BlockdevOnError', |
Kevin Wolf | 6cdbceb | 2017-02-20 18:10:05 +0100 | [diff] [blame] | 2550 | '*on-target-error': 'BlockdevOnError', |
Max Reitz | 481deba | 2018-06-13 20:18:22 +0200 | [diff] [blame] | 2551 | '*filter-node-name': 'str', |
John Snow | a6b58ad | 2018-09-06 09:02:22 -0400 | [diff] [blame] | 2552 | '*copy-mode': 'MirrorCopyMode', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 2553 | '*auto-finalize': 'bool', '*auto-dismiss': 'bool' }, |
| 2554 | 'allow-preconfig': true } |
Fam Zheng | df92562 | 2015-12-24 12:45:05 +0800 | [diff] [blame] | 2555 | |
| 2556 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 2557 | # @BlockIOThrottle: |
Eric Blake | 4dc9397 | 2016-07-13 21:50:21 -0600 | [diff] [blame] | 2558 | # |
| 2559 | # A set of parameters describing block throttling. |
| 2560 | # |
Markus Armbruster | df4097a | 2020-03-17 12:54:51 +0100 | [diff] [blame] | 2561 | # @device: Block device name |
Kevin Wolf | 7a9877a | 2016-09-20 13:38:48 +0200 | [diff] [blame] | 2562 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 2563 | # @id: The name or QOM path of the guest device (since: 2.8) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2564 | # |
| 2565 | # @bps: total throughput limit in bytes per second |
| 2566 | # |
| 2567 | # @bps_rd: read throughput limit in bytes per second |
| 2568 | # |
| 2569 | # @bps_wr: write throughput limit in bytes per second |
| 2570 | # |
| 2571 | # @iops: total I/O operations per second |
| 2572 | # |
Alberto Garcia | f5a845f | 2016-02-18 12:27:08 +0200 | [diff] [blame] | 2573 | # @iops_rd: read I/O operations per second |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2574 | # |
| 2575 | # @iops_wr: write I/O operations per second |
| 2576 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2577 | # @bps_max: total throughput limit during bursts, in bytes (Since 1.7) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2578 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2579 | # @bps_rd_max: read throughput limit during bursts, in bytes (Since |
| 2580 | # 1.7) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2581 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2582 | # @bps_wr_max: write throughput limit during bursts, in bytes (Since |
| 2583 | # 1.7) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2584 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2585 | # @iops_max: total I/O operations per second during bursts, in bytes |
| 2586 | # (Since 1.7) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2587 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2588 | # @iops_rd_max: read I/O operations per second during bursts, in bytes |
| 2589 | # (Since 1.7) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2590 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2591 | # @iops_wr_max: write I/O operations per second during bursts, in |
| 2592 | # bytes (Since 1.7) |
Alberto Garcia | dce1320 | 2016-02-18 12:27:03 +0200 | [diff] [blame] | 2593 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2594 | # @bps_max_length: maximum length of the @bps_max burst period, in |
| 2595 | # seconds. It must only be set if @bps_max is set as well. |
Markus Armbruster | 5305a4e | 2024-03-22 15:09:09 +0100 | [diff] [blame] | 2596 | # Defaults to 1. (Since 2.6) |
Alberto Garcia | dce1320 | 2016-02-18 12:27:03 +0200 | [diff] [blame] | 2597 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2598 | # @bps_rd_max_length: maximum length of the @bps_rd_max burst period, |
| 2599 | # in seconds. It must only be set if @bps_rd_max is set as well. |
Markus Armbruster | 5305a4e | 2024-03-22 15:09:09 +0100 | [diff] [blame] | 2600 | # Defaults to 1. (Since 2.6) |
Alberto Garcia | dce1320 | 2016-02-18 12:27:03 +0200 | [diff] [blame] | 2601 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2602 | # @bps_wr_max_length: maximum length of the @bps_wr_max burst period, |
| 2603 | # in seconds. It must only be set if @bps_wr_max is set as well. |
Markus Armbruster | 5305a4e | 2024-03-22 15:09:09 +0100 | [diff] [blame] | 2604 | # Defaults to 1. (Since 2.6) |
Alberto Garcia | dce1320 | 2016-02-18 12:27:03 +0200 | [diff] [blame] | 2605 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2606 | # @iops_max_length: maximum length of the @iops burst period, in |
| 2607 | # seconds. It must only be set if @iops_max is set as well. |
Markus Armbruster | 5305a4e | 2024-03-22 15:09:09 +0100 | [diff] [blame] | 2608 | # Defaults to 1. (Since 2.6) |
Alberto Garcia | dce1320 | 2016-02-18 12:27:03 +0200 | [diff] [blame] | 2609 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2610 | # @iops_rd_max_length: maximum length of the @iops_rd_max burst |
| 2611 | # period, in seconds. It must only be set if @iops_rd_max is set |
Markus Armbruster | 5305a4e | 2024-03-22 15:09:09 +0100 | [diff] [blame] | 2612 | # as well. Defaults to 1. (Since 2.6) |
Alberto Garcia | dce1320 | 2016-02-18 12:27:03 +0200 | [diff] [blame] | 2613 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2614 | # @iops_wr_max_length: maximum length of the @iops_wr_max burst |
| 2615 | # period, in seconds. It must only be set if @iops_wr_max is set |
Markus Armbruster | 5305a4e | 2024-03-22 15:09:09 +0100 | [diff] [blame] | 2616 | # as well. Defaults to 1. (Since 2.6) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2617 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 2618 | # @iops_size: an I/O size in bytes (Since 1.7) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2619 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 2620 | # @group: throttle group name (Since 2.4) |
Alberto Garcia | 76f4afb | 2015-06-08 18:17:44 +0200 | [diff] [blame] | 2621 | # |
Markus Armbruster | df4097a | 2020-03-17 12:54:51 +0100 | [diff] [blame] | 2622 | # Features: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2623 | # |
Markus Armbruster | df4097a | 2020-03-17 12:54:51 +0100 | [diff] [blame] | 2624 | # @deprecated: Member @device is deprecated. Use @id instead. |
| 2625 | # |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2626 | # Since: 1.1 |
| 2627 | ## |
Eric Blake | 4dc9397 | 2016-07-13 21:50:21 -0600 | [diff] [blame] | 2628 | { 'struct': 'BlockIOThrottle', |
Markus Armbruster | df4097a | 2020-03-17 12:54:51 +0100 | [diff] [blame] | 2629 | 'data': { '*device': { 'type': 'str', 'features': [ 'deprecated' ] }, |
| 2630 | '*id': 'str', 'bps': 'int', 'bps_rd': 'int', |
Kevin Wolf | 7a9877a | 2016-09-20 13:38:48 +0200 | [diff] [blame] | 2631 | 'bps_wr': 'int', 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2632 | '*bps_max': 'int', '*bps_rd_max': 'int', |
| 2633 | '*bps_wr_max': 'int', '*iops_max': 'int', |
| 2634 | '*iops_rd_max': 'int', '*iops_wr_max': 'int', |
Alberto Garcia | dce1320 | 2016-02-18 12:27:03 +0200 | [diff] [blame] | 2635 | '*bps_max_length': 'int', '*bps_rd_max_length': 'int', |
| 2636 | '*bps_wr_max_length': 'int', '*iops_max_length': 'int', |
| 2637 | '*iops_rd_max_length': 'int', '*iops_wr_max_length': 'int', |
Alberto Garcia | 76f4afb | 2015-06-08 18:17:44 +0200 | [diff] [blame] | 2638 | '*iops_size': 'int', '*group': 'str' } } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2639 | |
| 2640 | ## |
Manos Pitsidianakis | 432d889 | 2017-08-25 16:20:26 +0300 | [diff] [blame] | 2641 | # @ThrottleLimits: |
| 2642 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2643 | # Limit parameters for throttling. Since some limit combinations are |
| 2644 | # illegal, limits should always be set in one transaction. All fields |
| 2645 | # are optional. When setting limits, if a field is missing the |
| 2646 | # current value is not changed. |
Manos Pitsidianakis | 432d889 | 2017-08-25 16:20:26 +0300 | [diff] [blame] | 2647 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 2648 | # @iops-total: limit total I/O operations per second |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2649 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 2650 | # @iops-total-max: I/O operations burst |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2651 | # |
| 2652 | # @iops-total-max-length: length of the iops-total-max burst period, |
| 2653 | # in seconds It must only be set if @iops-total-max is set as |
| 2654 | # well. |
| 2655 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 2656 | # @iops-read: limit read operations per second |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2657 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 2658 | # @iops-read-max: I/O operations read burst |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2659 | # |
| 2660 | # @iops-read-max-length: length of the iops-read-max burst period, in |
| 2661 | # seconds It must only be set if @iops-read-max is set as well. |
| 2662 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 2663 | # @iops-write: limit write operations per second |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2664 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 2665 | # @iops-write-max: I/O operations write burst |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2666 | # |
| 2667 | # @iops-write-max-length: length of the iops-write-max burst period, |
| 2668 | # in seconds It must only be set if @iops-write-max is set as |
| 2669 | # well. |
| 2670 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 2671 | # @bps-total: limit total bytes per second |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2672 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 2673 | # @bps-total-max: total bytes burst |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2674 | # |
| 2675 | # @bps-total-max-length: length of the bps-total-max burst period, in |
| 2676 | # seconds. It must only be set if @bps-total-max is set as well. |
| 2677 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 2678 | # @bps-read: limit read bytes per second |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2679 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 2680 | # @bps-read-max: total bytes read burst |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2681 | # |
| 2682 | # @bps-read-max-length: length of the bps-read-max burst period, in |
| 2683 | # seconds It must only be set if @bps-read-max is set as well. |
| 2684 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 2685 | # @bps-write: limit write bytes per second |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2686 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 2687 | # @bps-write-max: total bytes write burst |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2688 | # |
| 2689 | # @bps-write-max-length: length of the bps-write-max burst period, in |
| 2690 | # seconds It must only be set if @bps-write-max is set as well. |
| 2691 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 2692 | # @iops-size: when limiting by iops max size of an I/O in bytes |
Manos Pitsidianakis | 432d889 | 2017-08-25 16:20:26 +0300 | [diff] [blame] | 2693 | # |
| 2694 | # Since: 2.11 |
| 2695 | ## |
| 2696 | { 'struct': 'ThrottleLimits', |
| 2697 | 'data': { '*iops-total' : 'int', '*iops-total-max' : 'int', |
| 2698 | '*iops-total-max-length' : 'int', '*iops-read' : 'int', |
| 2699 | '*iops-read-max' : 'int', '*iops-read-max-length' : 'int', |
| 2700 | '*iops-write' : 'int', '*iops-write-max' : 'int', |
| 2701 | '*iops-write-max-length' : 'int', '*bps-total' : 'int', |
| 2702 | '*bps-total-max' : 'int', '*bps-total-max-length' : 'int', |
| 2703 | '*bps-read' : 'int', '*bps-read-max' : 'int', |
| 2704 | '*bps-read-max-length' : 'int', '*bps-write' : 'int', |
| 2705 | '*bps-write-max' : 'int', '*bps-write-max-length' : 'int', |
| 2706 | '*iops-size' : 'int' } } |
| 2707 | |
| 2708 | ## |
Kevin Wolf | 381bd74 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 2709 | # @ThrottleGroupProperties: |
| 2710 | # |
| 2711 | # Properties for throttle-group objects. |
| 2712 | # |
Kevin Wolf | 381bd74 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 2713 | # @limits: limits to apply for this throttle group |
| 2714 | # |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 2715 | # Features: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2716 | # |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 2717 | # @unstable: All members starting with x- are aliases for the same key |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2718 | # without x- in the @limits object. This is not a stable |
| 2719 | # interface and may be removed or changed incompatibly in the |
| 2720 | # future. Use @limits for a supported stable interface. |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 2721 | # |
Kevin Wolf | 381bd74 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 2722 | # Since: 2.11 |
| 2723 | ## |
| 2724 | { 'struct': 'ThrottleGroupProperties', |
| 2725 | 'data': { '*limits': 'ThrottleLimits', |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 2726 | '*x-iops-total': { 'type': 'int', |
| 2727 | 'features': [ 'unstable' ] }, |
| 2728 | '*x-iops-total-max': { 'type': 'int', |
| 2729 | 'features': [ 'unstable' ] }, |
| 2730 | '*x-iops-total-max-length': { 'type': 'int', |
| 2731 | 'features': [ 'unstable' ] }, |
| 2732 | '*x-iops-read': { 'type': 'int', |
| 2733 | 'features': [ 'unstable' ] }, |
| 2734 | '*x-iops-read-max': { 'type': 'int', |
| 2735 | 'features': [ 'unstable' ] }, |
| 2736 | '*x-iops-read-max-length': { 'type': 'int', |
| 2737 | 'features': [ 'unstable' ] }, |
| 2738 | '*x-iops-write': { 'type': 'int', |
| 2739 | 'features': [ 'unstable' ] }, |
| 2740 | '*x-iops-write-max': { 'type': 'int', |
| 2741 | 'features': [ 'unstable' ] }, |
| 2742 | '*x-iops-write-max-length': { 'type': 'int', |
| 2743 | 'features': [ 'unstable' ] }, |
| 2744 | '*x-bps-total': { 'type': 'int', |
| 2745 | 'features': [ 'unstable' ] }, |
| 2746 | '*x-bps-total-max': { 'type': 'int', |
| 2747 | 'features': [ 'unstable' ] }, |
| 2748 | '*x-bps-total-max-length': { 'type': 'int', |
| 2749 | 'features': [ 'unstable' ] }, |
| 2750 | '*x-bps-read': { 'type': 'int', |
| 2751 | 'features': [ 'unstable' ] }, |
| 2752 | '*x-bps-read-max': { 'type': 'int', |
| 2753 | 'features': [ 'unstable' ] }, |
| 2754 | '*x-bps-read-max-length': { 'type': 'int', |
| 2755 | 'features': [ 'unstable' ] }, |
| 2756 | '*x-bps-write': { 'type': 'int', |
| 2757 | 'features': [ 'unstable' ] }, |
| 2758 | '*x-bps-write-max': { 'type': 'int', |
| 2759 | 'features': [ 'unstable' ] }, |
| 2760 | '*x-bps-write-max-length': { 'type': 'int', |
| 2761 | 'features': [ 'unstable' ] }, |
| 2762 | '*x-iops-size': { 'type': 'int', |
| 2763 | 'features': [ 'unstable' ] } } } |
Kevin Wolf | 381bd74 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 2764 | |
| 2765 | ## |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2766 | # @block-stream: |
| 2767 | # |
| 2768 | # Copy data from a backing file into a block device. |
| 2769 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2770 | # The block streaming operation is performed in the background until |
| 2771 | # the entire backing file has been copied. This command returns |
| 2772 | # immediately once streaming has started. The status of ongoing block |
| 2773 | # streaming operations can be checked with query-block-jobs. The |
| 2774 | # operation can be stopped before it has completed using the |
| 2775 | # block-job-cancel command. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2776 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2777 | # The node that receives the data is called the top image, can be |
| 2778 | # located in any part of the chain (but always above the base image; |
| 2779 | # see below) and can be specified using its device or node name. |
| 2780 | # Earlier qemu versions only allowed 'device' to name the top level |
| 2781 | # node; presence of the 'base-node' parameter during introspection can |
| 2782 | # be used as a witness of the enhanced semantics of 'device'. |
Alberto Garcia | 554b614 | 2016-10-28 10:08:11 +0300 | [diff] [blame] | 2783 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2784 | # If a base file is specified then sectors are not copied from that |
| 2785 | # base file and its backing chain. This can be used to stream a |
| 2786 | # subset of the backing file chain instead of flattening the entire |
| 2787 | # image. When streaming completes the image file will have the base |
| 2788 | # file as its backing file, unless that node was changed while the job |
| 2789 | # was running. In that case, base's parent's backing (or filtered, |
| 2790 | # whichever exists) child (i.e., base at the beginning of the job) |
| 2791 | # will be the new backing file. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2792 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2793 | # On successful completion the image file is updated to drop the |
| 2794 | # backing file and the BLOCK_JOB_COMPLETED event is emitted. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2795 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2796 | # In case @device is a filter node, block-stream modifies the first |
| 2797 | # non-filter overlay node below it to point to the new backing node |
| 2798 | # instead of modifying @device itself. |
Max Reitz | 67acfd2 | 2019-06-12 17:48:11 +0200 | [diff] [blame] | 2799 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2800 | # @job-id: identifier for the newly-created block job. If omitted, |
| 2801 | # the device name will be used. (Since 2.7) |
Alberto Garcia | 2323322 | 2016-07-05 17:28:59 +0300 | [diff] [blame] | 2802 | # |
Alberto Garcia | 554b614 | 2016-10-28 10:08:11 +0300 | [diff] [blame] | 2803 | # @device: the device or node name of the top image |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2804 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2805 | # @base: the common backing file name. It cannot be set if @base-node |
| 2806 | # or @bottom is also set. |
Alberto Garcia | 312fe09 | 2016-10-28 10:08:19 +0300 | [diff] [blame] | 2807 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2808 | # @base-node: the node name of the backing file. It cannot be set if |
| 2809 | # @base or @bottom is also set. (Since 2.8) |
Vladimir Sementsov-Ogievskiy | 7f4a396 | 2020-12-16 09:17:00 +0300 | [diff] [blame] | 2810 | # |
| 2811 | # @bottom: the last node in the chain that should be streamed into |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2812 | # top. It cannot be set if @base or @base-node is also set. It |
| 2813 | # cannot be filter node. (Since 6.0) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2814 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2815 | # @backing-file: The backing file string to write into the top image. |
| 2816 | # This filename is not validated. |
Jeff Cody | 13d8cc5 | 2014-06-25 15:40:11 -0400 | [diff] [blame] | 2817 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2818 | # If a pathname string is such that it cannot be resolved by QEMU, |
| 2819 | # that means that subsequent QMP or HMP commands must use |
| 2820 | # node-names for the image in question, as filename lookup methods |
| 2821 | # will fail. |
Jeff Cody | 13d8cc5 | 2014-06-25 15:40:11 -0400 | [diff] [blame] | 2822 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2823 | # If not specified, QEMU will automatically determine the backing |
| 2824 | # file string to use, or error out if there is no obvious choice. |
| 2825 | # Care should be taken when specifying the string, to specify a |
| 2826 | # valid filename or protocol. (Since 2.1) |
Jeff Cody | 13d8cc5 | 2014-06-25 15:40:11 -0400 | [diff] [blame] | 2827 | # |
Markus Armbruster | 209e64d | 2024-03-22 15:09:08 +0100 | [diff] [blame] | 2828 | # @backing-mask-protocol: If true, replace any protocol mentioned in |
| 2829 | # the 'backing file format' with 'raw', rather than storing the |
| 2830 | # protocol name as the backing format. Can be used even when no |
| 2831 | # image header will be updated (default false; since 9.0). |
Peter Krempa | 72098a3 | 2023-12-05 18:14:42 +0100 | [diff] [blame] | 2832 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 2833 | # @speed: the maximum speed, in bytes per second |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2834 | # |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 2835 | # @on-error: the action to take on an error (default report). 'stop' |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2836 | # and 'enospc' can only be used if the block device supports |
| 2837 | # io-status (see BlockInfo). (Since 1.3) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2838 | # |
Andrey Shinkevich | 880747a | 2020-12-16 09:16:54 +0300 | [diff] [blame] | 2839 | # @filter-node-name: the node name that should be assigned to the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2840 | # filter driver that the stream job inserts into the graph above |
| 2841 | # @device. If this option is not given, a node name is |
| 2842 | # autogenerated. (Since: 6.0) |
Andrey Shinkevich | 880747a | 2020-12-16 09:16:54 +0300 | [diff] [blame] | 2843 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2844 | # @auto-finalize: When false, this job will wait in a PENDING state |
| 2845 | # after it has finished its work, waiting for @block-job-finalize |
| 2846 | # before making any block graph changes. When true, this job will |
| 2847 | # automatically perform its abort or commit actions. Defaults to |
| 2848 | # true. (Since 3.1) |
John Snow | 241ca1a | 2018-09-06 09:02:23 -0400 | [diff] [blame] | 2849 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2850 | # @auto-dismiss: When false, this job will wait in a CONCLUDED state |
| 2851 | # after it has completely ceased all work, and awaits |
| 2852 | # @block-job-dismiss. When true, this job will automatically |
| 2853 | # disappear from the query list without user intervention. |
| 2854 | # Defaults to true. (Since 3.1) |
John Snow | 241ca1a | 2018-09-06 09:02:23 -0400 | [diff] [blame] | 2855 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 2856 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2857 | # - If @device does not exist, DeviceNotFound. |
Marc-André Lureau | 49b37c2 | 2016-06-23 14:52:13 +0200 | [diff] [blame] | 2858 | # |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2859 | # Since: 1.1 |
Marc-André Lureau | 49b37c2 | 2016-06-23 14:52:13 +0200 | [diff] [blame] | 2860 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 2861 | # .. qmp-example:: |
Marc-André Lureau | 49b37c2 | 2016-06-23 14:52:13 +0200 | [diff] [blame] | 2862 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 2863 | # -> { "execute": "block-stream", |
| 2864 | # "arguments": { "device": "virtio0", |
| 2865 | # "base": "/tmp/master.qcow2" } } |
| 2866 | # <- { "return": {} } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2867 | ## |
| 2868 | { 'command': 'block-stream', |
Alberto Garcia | 2323322 | 2016-07-05 17:28:59 +0300 | [diff] [blame] | 2869 | 'data': { '*job-id': 'str', 'device': 'str', '*base': 'str', |
Peter Krempa | 72098a3 | 2023-12-05 18:14:42 +0100 | [diff] [blame] | 2870 | '*base-node': 'str', '*backing-file': 'str', |
| 2871 | '*backing-mask-protocol': 'bool', |
| 2872 | '*bottom': 'str', |
Vladimir Sementsov-Ogievskiy | 7f4a396 | 2020-12-16 09:17:00 +0300 | [diff] [blame] | 2873 | '*speed': 'int', '*on-error': 'BlockdevOnError', |
Andrey Shinkevich | 880747a | 2020-12-16 09:16:54 +0300 | [diff] [blame] | 2874 | '*filter-node-name': 'str', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 2875 | '*auto-finalize': 'bool', '*auto-dismiss': 'bool' }, |
| 2876 | 'allow-preconfig': true } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2877 | |
| 2878 | ## |
| 2879 | # @block-job-set-speed: |
| 2880 | # |
| 2881 | # Set maximum speed for a background block operation. |
| 2882 | # |
| 2883 | # This command can only be issued when there is an active block job. |
| 2884 | # |
| 2885 | # Throttling can be disabled by setting the speed to 0. |
| 2886 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2887 | # @device: The job identifier. This used to be a device name (hence |
| 2888 | # the name of the parameter), but since QEMU 2.7 it can have other |
| 2889 | # values. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2890 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 2891 | # @speed: the maximum speed, in bytes per second, or 0 for unlimited. |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2892 | # Defaults to 0. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2893 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 2894 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2895 | # - If no background operation is active on this device, |
| 2896 | # DeviceNotActive |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2897 | # |
| 2898 | # Since: 1.1 |
| 2899 | ## |
| 2900 | { 'command': 'block-job-set-speed', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 2901 | 'data': { 'device': 'str', 'speed': 'int' }, |
| 2902 | 'allow-preconfig': true } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2903 | |
| 2904 | ## |
| 2905 | # @block-job-cancel: |
| 2906 | # |
| 2907 | # Stop an active background block operation. |
| 2908 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2909 | # This command returns immediately after marking the active background |
| 2910 | # block operation for cancellation. It is an error to call this |
| 2911 | # command if no operation is in progress. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2912 | # |
| 2913 | # The operation will cancel as soon as possible and then emit the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2914 | # BLOCK_JOB_CANCELLED event. Before that happens the job is still |
| 2915 | # visible when enumerated using query-block-jobs. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2916 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2917 | # Note that if you issue 'block-job-cancel' after 'drive-mirror' has |
| 2918 | # indicated (via the event BLOCK_JOB_READY) that the source and |
| 2919 | # destination are synchronized, then the event triggered by this |
| 2920 | # command changes to BLOCK_JOB_COMPLETED, to indicate that the |
| 2921 | # mirroring has ended and the destination now has a point-in-time copy |
| 2922 | # tied to the time of the cancellation. |
Kashyap Chamarthy | c117bb1 | 2017-11-21 12:52:53 +0100 | [diff] [blame] | 2923 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2924 | # For streaming, the image file retains its backing file unless the |
| 2925 | # streaming operation happens to complete just as it is being |
| 2926 | # cancelled. A new streaming operation can be started at a later time |
| 2927 | # to finish copying all data from the backing file. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2928 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2929 | # @device: The job identifier. This used to be a device name (hence |
| 2930 | # the name of the parameter), but since QEMU 2.7 it can have other |
| 2931 | # values. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2932 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2933 | # @force: If true, and the job has already emitted the event |
| 2934 | # BLOCK_JOB_READY, abandon the job immediately (even if it is |
| 2935 | # paused) instead of waiting for the destination to complete its |
| 2936 | # final synchronization (since 1.3) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2937 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 2938 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2939 | # - If no background operation is active on this device, |
| 2940 | # DeviceNotActive |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2941 | # |
| 2942 | # Since: 1.1 |
| 2943 | ## |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 2944 | { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' }, |
| 2945 | 'allow-preconfig': true } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2946 | |
| 2947 | ## |
| 2948 | # @block-job-pause: |
| 2949 | # |
| 2950 | # Pause an active background block operation. |
| 2951 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2952 | # This command returns immediately after marking the active background |
| 2953 | # block operation for pausing. It is an error to call this command if |
| 2954 | # no operation is in progress or if the job is already paused. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2955 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2956 | # The operation will pause as soon as possible. No event is emitted |
| 2957 | # when the operation is actually paused. Cancelling a paused job |
| 2958 | # automatically resumes it. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2959 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2960 | # @device: The job identifier. This used to be a device name (hence |
| 2961 | # the name of the parameter), but since QEMU 2.7 it can have other |
| 2962 | # values. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2963 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 2964 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2965 | # - If no background operation is active on this device, |
| 2966 | # DeviceNotActive |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2967 | # |
| 2968 | # Since: 1.3 |
| 2969 | ## |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 2970 | { 'command': 'block-job-pause', 'data': { 'device': 'str' }, |
| 2971 | 'allow-preconfig': true } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2972 | |
| 2973 | ## |
| 2974 | # @block-job-resume: |
| 2975 | # |
| 2976 | # Resume an active background block operation. |
| 2977 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2978 | # This command returns immediately after resuming a paused background |
| 2979 | # block operation. It is an error to call this command if no |
| 2980 | # operation is in progress or if the job is not paused. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2981 | # |
| 2982 | # This command also clears the error status of the job. |
| 2983 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2984 | # @device: The job identifier. This used to be a device name (hence |
| 2985 | # the name of the parameter), but since QEMU 2.7 it can have other |
| 2986 | # values. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2987 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 2988 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 2989 | # - If no background operation is active on this device, |
| 2990 | # DeviceNotActive |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2991 | # |
| 2992 | # Since: 1.3 |
| 2993 | ## |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 2994 | { 'command': 'block-job-resume', 'data': { 'device': 'str' }, |
| 2995 | 'allow-preconfig': true } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 2996 | |
| 2997 | ## |
| 2998 | # @block-job-complete: |
| 2999 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3000 | # Manually trigger completion of an active background block operation. |
| 3001 | # This is supported for drive mirroring, where it also switches the |
| 3002 | # device to write to the target path only. The ability to complete is |
| 3003 | # signaled with a BLOCK_JOB_READY event. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3004 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3005 | # This command completes an active background block operation |
| 3006 | # synchronously. The ordering of this command's return with the |
| 3007 | # BLOCK_JOB_COMPLETED event is not defined. Note that if an I/O error |
| 3008 | # occurs during the processing of this command: 1) the command itself |
| 3009 | # will fail; 2) the error will be processed according to the |
| 3010 | # rerror/werror arguments that were specified when starting the |
| 3011 | # operation. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3012 | # |
| 3013 | # A cancelled or paused job cannot be completed. |
| 3014 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3015 | # @device: The job identifier. This used to be a device name (hence |
| 3016 | # the name of the parameter), but since QEMU 2.7 it can have other |
| 3017 | # values. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3018 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 3019 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3020 | # - If no background operation is active on this device, |
| 3021 | # DeviceNotActive |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3022 | # |
| 3023 | # Since: 1.3 |
| 3024 | ## |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 3025 | { 'command': 'block-job-complete', 'data': { 'device': 'str' }, |
| 3026 | 'allow-preconfig': true } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3027 | |
| 3028 | ## |
John Snow | 75f7105 | 2018-03-10 03:27:36 -0500 | [diff] [blame] | 3029 | # @block-job-dismiss: |
| 3030 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3031 | # For jobs that have already concluded, remove them from the |
| 3032 | # block-job-query list. This command only needs to be run for jobs |
| 3033 | # which were started with QEMU 2.12+ job lifetime management |
| 3034 | # semantics. |
John Snow | 75f7105 | 2018-03-10 03:27:36 -0500 | [diff] [blame] | 3035 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3036 | # This command will refuse to operate on any job that has not yet |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 3037 | # reached its terminal state, JOB_STATUS_CONCLUDED. For jobs that |
| 3038 | # make use of the BLOCK_JOB_READY event, block-job-cancel or |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3039 | # block-job-complete will still need to be used as appropriate. |
John Snow | 75f7105 | 2018-03-10 03:27:36 -0500 | [diff] [blame] | 3040 | # |
| 3041 | # @id: The job identifier. |
| 3042 | # |
John Snow | 75f7105 | 2018-03-10 03:27:36 -0500 | [diff] [blame] | 3043 | # Since: 2.12 |
| 3044 | ## |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 3045 | { 'command': 'block-job-dismiss', 'data': { 'id': 'str' }, |
| 3046 | 'allow-preconfig': true } |
John Snow | 75f7105 | 2018-03-10 03:27:36 -0500 | [diff] [blame] | 3047 | |
| 3048 | ## |
John Snow | 11b61fb | 2018-03-10 03:27:43 -0500 | [diff] [blame] | 3049 | # @block-job-finalize: |
| 3050 | # |
| 3051 | # Once a job that has manual=true reaches the pending state, it can be |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3052 | # instructed to finalize any graph changes and do any necessary |
| 3053 | # cleanup via this command. For jobs in a transaction, instructing |
| 3054 | # one job to finalize will force ALL jobs in the transaction to |
| 3055 | # finalize, so it is only necessary to instruct a single member job to |
| 3056 | # finalize. |
John Snow | 11b61fb | 2018-03-10 03:27:43 -0500 | [diff] [blame] | 3057 | # |
| 3058 | # @id: The job identifier. |
| 3059 | # |
John Snow | 11b61fb | 2018-03-10 03:27:43 -0500 | [diff] [blame] | 3060 | # Since: 2.12 |
| 3061 | ## |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 3062 | { 'command': 'block-job-finalize', 'data': { 'id': 'str' }, |
| 3063 | 'allow-preconfig': true } |
John Snow | 11b61fb | 2018-03-10 03:27:43 -0500 | [diff] [blame] | 3064 | |
| 3065 | ## |
Fiona Ebner | 2d400d1 | 2023-10-31 14:54:26 +0100 | [diff] [blame] | 3066 | # @BlockJobChangeOptionsMirror: |
| 3067 | # |
| 3068 | # @copy-mode: Switch to this copy mode. Currently, only the switch |
| 3069 | # from 'background' to 'write-blocking' is implemented. |
| 3070 | # |
| 3071 | # Since: 8.2 |
| 3072 | ## |
| 3073 | { 'struct': 'BlockJobChangeOptionsMirror', |
| 3074 | 'data': { 'copy-mode' : 'MirrorCopyMode' } } |
| 3075 | |
| 3076 | ## |
Fiona Ebner | 61a3a5a | 2023-10-31 14:54:22 +0100 | [diff] [blame] | 3077 | # @BlockJobChangeOptions: |
| 3078 | # |
| 3079 | # Block job options that can be changed after job creation. |
| 3080 | # |
| 3081 | # @id: The job identifier |
| 3082 | # |
| 3083 | # @type: The job type |
| 3084 | # |
Markus Armbruster | 37507c1 | 2024-01-20 10:53:27 +0100 | [diff] [blame] | 3085 | # Since: 8.2 |
Fiona Ebner | 61a3a5a | 2023-10-31 14:54:22 +0100 | [diff] [blame] | 3086 | ## |
| 3087 | { 'union': 'BlockJobChangeOptions', |
| 3088 | 'base': { 'id': 'str', 'type': 'JobType' }, |
| 3089 | 'discriminator': 'type', |
Fiona Ebner | 2d400d1 | 2023-10-31 14:54:26 +0100 | [diff] [blame] | 3090 | 'data': { 'mirror': 'BlockJobChangeOptionsMirror' } } |
Fiona Ebner | 61a3a5a | 2023-10-31 14:54:22 +0100 | [diff] [blame] | 3091 | |
| 3092 | ## |
| 3093 | # @block-job-change: |
| 3094 | # |
| 3095 | # Change the block job's options. |
| 3096 | # |
| 3097 | # Since: 8.2 |
| 3098 | ## |
| 3099 | { 'command': 'block-job-change', |
| 3100 | 'data': 'BlockJobChangeOptions', 'boxed': true } |
| 3101 | |
| 3102 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3103 | # @BlockdevDiscardOptions: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3104 | # |
| 3105 | # Determines how to handle discard requests. |
| 3106 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3107 | # @ignore: Ignore the request |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3108 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3109 | # @unmap: Forward as an unmap request |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3110 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3111 | # Since: 2.9 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3112 | ## |
| 3113 | { 'enum': 'BlockdevDiscardOptions', |
| 3114 | 'data': [ 'ignore', 'unmap' ] } |
| 3115 | |
| 3116 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3117 | # @BlockdevDetectZeroesOptions: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3118 | # |
| 3119 | # Describes the operation mode for the automatic conversion of plain |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3120 | # zero writes by the OS to driver specific optimized zero write |
| 3121 | # commands. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3122 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3123 | # @off: Disabled (default) |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3124 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3125 | # @on: Enabled |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3126 | # |
| 3127 | # @unmap: Enabled and even try to unmap blocks if possible. This |
| 3128 | # requires also that @BlockdevDiscardOptions is set to unmap for |
| 3129 | # this device. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3130 | # |
| 3131 | # Since: 2.1 |
| 3132 | ## |
| 3133 | { 'enum': 'BlockdevDetectZeroesOptions', |
| 3134 | 'data': [ 'off', 'on', 'unmap' ] } |
| 3135 | |
| 3136 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3137 | # @BlockdevAioOptions: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3138 | # |
| 3139 | # Selects the AIO backend to handle I/O requests |
| 3140 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3141 | # @threads: Use qemu's thread pool |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3142 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3143 | # @native: Use native AIO backend (only Linux and Windows) |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3144 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3145 | # @io_uring: Use linux io_uring (since 5.0) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3146 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3147 | # Since: 2.9 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3148 | ## |
| 3149 | { 'enum': 'BlockdevAioOptions', |
Aarushi Mehta | f14beae | 2020-01-20 14:18:45 +0000 | [diff] [blame] | 3150 | 'data': [ 'threads', 'native', |
Marc-André Lureau | 8a9f1e1 | 2021-08-04 12:31:05 +0400 | [diff] [blame] | 3151 | { 'name': 'io_uring', 'if': 'CONFIG_LINUX_IO_URING' } ] } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3152 | |
| 3153 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3154 | # @BlockdevCacheOptions: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3155 | # |
| 3156 | # Includes cache-related options for block devices |
| 3157 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3158 | # @direct: enables use of O_DIRECT (bypass the host page cache; |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3159 | # default: false) |
| 3160 | # |
| 3161 | # @no-flush: ignore any flush requests for the device (default: false) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3162 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3163 | # Since: 2.9 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3164 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 3165 | { 'struct': 'BlockdevCacheOptions', |
Kevin Wolf | aaa436f | 2016-03-14 13:16:51 +0100 | [diff] [blame] | 3166 | 'data': { '*direct': 'bool', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3167 | '*no-flush': 'bool' } } |
| 3168 | |
| 3169 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3170 | # @BlockdevDriver: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3171 | # |
| 3172 | # Drivers that are supported in block device operations. |
| 3173 | # |
Manos Pitsidianakis | d8e7d87 | 2017-08-25 16:20:27 +0300 | [diff] [blame] | 3174 | # @throttle: Since 2.11 |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3175 | # |
Fam Zheng | d87ee3d | 2018-01-16 14:09:01 +0800 | [diff] [blame] | 3176 | # @nvme: Since 2.12 |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3177 | # |
Peter Maydell | 51f63ec | 2018-05-22 11:39:56 +0100 | [diff] [blame] | 3178 | # @copy-on-read: Since 3.0 |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3179 | # |
Aapo Vienamo | bfcc224 | 2018-07-03 17:48:48 +0300 | [diff] [blame] | 3180 | # @blklogwrites: Since 3.0 |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3181 | # |
Pavel Dovgalyuk | 35e32d9 | 2019-10-16 11:40:39 +0300 | [diff] [blame] | 3182 | # @blkreplay: Since 4.2 |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3183 | # |
Andrey Shinkevich | f41388e | 2019-12-02 15:15:04 +0300 | [diff] [blame] | 3184 | # @compress: Since 5.0 |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3185 | # |
Vladimir Sementsov-Ogievskiy | 783b282 | 2021-08-24 11:38:44 +0300 | [diff] [blame] | 3186 | # @copy-before-write: Since 6.2 |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3187 | # |
Vladimir Sementsov-Ogievskiy | 1c14eaa | 2022-03-03 20:43:44 +0100 | [diff] [blame] | 3188 | # @snapshot-access: Since 7.0 |
Ashish Mittal | da92c3f | 2017-04-03 20:48:08 -0700 | [diff] [blame] | 3189 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3190 | # Since: 2.9 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3191 | ## |
| 3192 | { 'enum': 'BlockdevDriver', |
Pavel Dovgalyuk | 35e32d9 | 2019-10-16 11:40:39 +0300 | [diff] [blame] | 3193 | 'data': [ 'blkdebug', 'blklogwrites', 'blkreplay', 'blkverify', 'bochs', |
Vladimir Sementsov-Ogievskiy | 783b282 | 2021-08-24 11:38:44 +0300 | [diff] [blame] | 3194 | 'cloop', 'compress', 'copy-before-write', 'copy-on-read', 'dmg', |
Vladimir Sementsov-Ogievskiy | 1c14eaa | 2022-03-03 20:43:44 +0100 | [diff] [blame] | 3195 | 'file', 'snapshot-access', 'ftp', 'ftps', 'gluster', |
Marc-André Lureau | 8a9f1e1 | 2021-08-04 12:31:05 +0400 | [diff] [blame] | 3196 | {'name': 'host_cdrom', 'if': 'HAVE_HOST_BLOCK_DEVICE' }, |
| 3197 | {'name': 'host_device', 'if': 'HAVE_HOST_BLOCK_DEVICE' }, |
Stefan Hajnoczi | fd66dbd | 2022-10-13 14:58:57 -0400 | [diff] [blame] | 3198 | 'http', 'https', |
| 3199 | { 'name': 'io_uring', 'if': 'CONFIG_BLKIO' }, |
| 3200 | 'iscsi', |
| 3201 | 'luks', 'nbd', 'nfs', 'null-aio', 'null-co', 'nvme', |
| 3202 | { 'name': 'nvme-io_uring', 'if': 'CONFIG_BLKIO' }, |
| 3203 | 'parallels', 'preallocate', 'qcow', 'qcow2', 'qed', 'quorum', |
| 3204 | 'raw', 'rbd', |
Marc-André Lureau | 8a9f1e1 | 2021-08-04 12:31:05 +0400 | [diff] [blame] | 3205 | { 'name': 'replication', 'if': 'CONFIG_REPLICATION' }, |
Stefan Hajnoczi | fd66dbd | 2022-10-13 14:58:57 -0400 | [diff] [blame] | 3206 | 'ssh', 'throttle', 'vdi', 'vhdx', |
Alberto Faria | 03d9e4c | 2022-10-28 14:16:35 +0100 | [diff] [blame] | 3207 | { 'name': 'virtio-blk-vfio-pci', 'if': 'CONFIG_BLKIO' }, |
Stefan Hajnoczi | fd66dbd | 2022-10-13 14:58:57 -0400 | [diff] [blame] | 3208 | { 'name': 'virtio-blk-vhost-user', 'if': 'CONFIG_BLKIO' }, |
| 3209 | { 'name': 'virtio-blk-vhost-vdpa', 'if': 'CONFIG_BLKIO' }, |
| 3210 | 'vmdk', 'vpc', 'vvfat' ] } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3211 | |
| 3212 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3213 | # @BlockdevOptionsFile: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3214 | # |
Kevin Wolf | 6855528 | 2016-09-08 13:08:20 +0200 | [diff] [blame] | 3215 | # Driver specific block device options for the file backend. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3216 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3217 | # @filename: path to the image file |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3218 | # |
| 3219 | # @pr-manager: the id for the object that will handle persistent |
| 3220 | # reservations for this device (default: none, forward the |
| 3221 | # commands via SG_IO; since 2.11) |
| 3222 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3223 | # @aio: AIO backend (default: threads) (since: 2.8) |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3224 | # |
| 3225 | # @aio-max-batch: maximum number of requests to batch together into a |
| 3226 | # single submission in the AIO backend. The smallest value |
| 3227 | # between this and the aio-max-batch value of the IOThread object |
| 3228 | # is chosen. 0 means that the AIO backend will handle it |
| 3229 | # automatically. (default: 0, since 6.2) |
| 3230 | # |
| 3231 | # @locking: whether to enable file locking. If set to 'auto', only |
| 3232 | # enable when Open File Descriptor (OFD) locking API is available |
| 3233 | # (default: auto, since 2.10) |
| 3234 | # |
| 3235 | # @drop-cache: invalidate page cache during live migration. This |
| 3236 | # prevents stale data on the migration destination with |
| 3237 | # cache.direct=off. Currently only supported on Linux hosts. |
| 3238 | # (default: on, since: 4.0) |
| 3239 | # |
| 3240 | # @x-check-cache-dropped: whether to check that page cache was dropped |
| 3241 | # on live migration. May cause noticeable delays if the image |
| 3242 | # file is large, do not use in production. (default: off) |
| 3243 | # (since: 3.0) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3244 | # |
Kevin Wolf | c9d4070 | 2019-06-06 17:38:02 +0200 | [diff] [blame] | 3245 | # Features: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3246 | # |
| 3247 | # @dynamic-auto-read-only: If present, enabled auto-read-only means |
| 3248 | # that the driver will open the image read-only at first, |
| 3249 | # dynamically reopen the image file read-write when the first |
| 3250 | # writer is attached to the node and reopen read-only when the |
| 3251 | # last writer is detached. This allows giving QEMU write |
| 3252 | # permissions only on demand when an operation actually needs |
| 3253 | # write access. |
| 3254 | # |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 3255 | # @unstable: Member x-check-cache-dropped is meant for debugging. |
Kevin Wolf | c9d4070 | 2019-06-06 17:38:02 +0200 | [diff] [blame] | 3256 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3257 | # Since: 2.9 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3258 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 3259 | { 'struct': 'BlockdevOptionsFile', |
Kevin Wolf | 0a4279d | 2016-09-08 15:09:01 +0200 | [diff] [blame] | 3260 | 'data': { 'filename': 'str', |
Paolo Bonzini | 7c9e527 | 2017-08-21 18:58:56 +0200 | [diff] [blame] | 3261 | '*pr-manager': 'str', |
Fam Zheng | 16b48d5 | 2017-05-03 00:35:50 +0800 | [diff] [blame] | 3262 | '*locking': 'OnOffAuto', |
Stefan Hajnoczi | 31be8a2 | 2018-04-27 17:23:12 +0100 | [diff] [blame] | 3263 | '*aio': 'BlockdevAioOptions', |
Stefano Garzarella | 684960d | 2021-10-26 18:23:44 +0200 | [diff] [blame] | 3264 | '*aio-max-batch': 'int', |
Peter Maydell | dbb28bc | 2020-02-13 17:56:27 +0000 | [diff] [blame] | 3265 | '*drop-cache': {'type': 'bool', |
Marc-André Lureau | 8a9f1e1 | 2021-08-04 12:31:05 +0400 | [diff] [blame] | 3266 | 'if': 'CONFIG_LINUX'}, |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 3267 | '*x-check-cache-dropped': { 'type': 'bool', |
| 3268 | 'features': [ 'unstable' ] } }, |
Kevin Wolf | c9d4070 | 2019-06-06 17:38:02 +0200 | [diff] [blame] | 3269 | 'features': [ { 'name': 'dynamic-auto-read-only', |
Marc-André Lureau | 8a9f1e1 | 2021-08-04 12:31:05 +0400 | [diff] [blame] | 3270 | 'if': 'CONFIG_POSIX' } ] } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3271 | |
| 3272 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3273 | # @BlockdevOptionsNull: |
Fam Zheng | e819ab2 | 2014-09-11 14:09:56 +0800 | [diff] [blame] | 3274 | # |
| 3275 | # Driver specific block device options for the null backend. |
| 3276 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3277 | # @size: size of the device in bytes. |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3278 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 3279 | # @latency-ns: emulated latency (in nanoseconds) in processing |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3280 | # requests. Default to zero which completes requests immediately. |
| 3281 | # (Since 2.4) |
| 3282 | # |
| 3283 | # @read-zeroes: if true, reads from the device produce zeroes; if |
| 3284 | # false, the buffer is left unchanged. |
| 3285 | # (default: false; since: 4.1) |
Fam Zheng | e819ab2 | 2014-09-11 14:09:56 +0800 | [diff] [blame] | 3286 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3287 | # Since: 2.9 |
Fam Zheng | e819ab2 | 2014-09-11 14:09:56 +0800 | [diff] [blame] | 3288 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 3289 | { 'struct': 'BlockdevOptionsNull', |
Kevin Wolf | 128b05f | 2019-06-17 13:54:48 +0200 | [diff] [blame] | 3290 | 'data': { '*size': 'int', '*latency-ns': 'uint64', '*read-zeroes': 'bool' } } |
Fam Zheng | e819ab2 | 2014-09-11 14:09:56 +0800 | [diff] [blame] | 3291 | |
| 3292 | ## |
Fam Zheng | d87ee3d | 2018-01-16 14:09:01 +0800 | [diff] [blame] | 3293 | # @BlockdevOptionsNVMe: |
| 3294 | # |
| 3295 | # Driver specific block device options for the NVMe backend. |
| 3296 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3297 | # @device: PCI controller address of the NVMe device in format |
| 3298 | # hhhh:bb:ss.f (host:bus:slot.function) |
| 3299 | # |
Fam Zheng | d87ee3d | 2018-01-16 14:09:01 +0800 | [diff] [blame] | 3300 | # @namespace: namespace number of the device, starting from 1. |
| 3301 | # |
Daniel P. Berrangé | ecaf647 | 2019-12-06 14:38:11 +0000 | [diff] [blame] | 3302 | # Note that the PCI @device must have been unbound from any host |
| 3303 | # kernel driver before instructing QEMU to add the blockdev. |
| 3304 | # |
Fam Zheng | d87ee3d | 2018-01-16 14:09:01 +0800 | [diff] [blame] | 3305 | # Since: 2.12 |
| 3306 | ## |
| 3307 | { 'struct': 'BlockdevOptionsNVMe', |
| 3308 | 'data': { 'device': 'str', 'namespace': 'int' } } |
| 3309 | |
| 3310 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3311 | # @BlockdevOptionsVVFAT: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3312 | # |
| 3313 | # Driver specific block device options for the vvfat protocol. |
| 3314 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3315 | # @dir: directory to be exported as FAT image |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3316 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3317 | # @fat-type: FAT type: 12, 16 or 32 |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3318 | # |
| 3319 | # @floppy: whether to export a floppy image (true) or partitioned hard |
| 3320 | # disk (false; default) |
| 3321 | # |
| 3322 | # @label: set the volume label, limited to 11 bytes. FAT16 and FAT32 |
| 3323 | # traditionally have some restrictions on labels, which are |
| 3324 | # ignored by most operating systems. Defaults to "QEMU VVFAT". |
| 3325 | # (since 2.4) |
| 3326 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3327 | # @rw: whether to allow write operations (default: false) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3328 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3329 | # Since: 2.9 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3330 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 3331 | { 'struct': 'BlockdevOptionsVVFAT', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3332 | 'data': { 'dir': 'str', '*fat-type': 'int', '*floppy': 'bool', |
Wolfgang Bumiller | d5941dd | 2015-06-19 11:35:29 +0200 | [diff] [blame] | 3333 | '*label': 'str', '*rw': 'bool' } } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3334 | |
| 3335 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3336 | # @BlockdevOptionsGenericFormat: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3337 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3338 | # Driver specific block device options for image format that have no |
| 3339 | # option besides their data source. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3340 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3341 | # @file: reference to or definition of the data source block device |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3342 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3343 | # Since: 2.9 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3344 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 3345 | { 'struct': 'BlockdevOptionsGenericFormat', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3346 | 'data': { 'file': 'BlockdevRef' } } |
| 3347 | |
| 3348 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3349 | # @BlockdevOptionsLUKS: |
Daniel P. Berrange | 7836857 | 2016-03-21 14:11:47 +0000 | [diff] [blame] | 3350 | # |
| 3351 | # Driver specific block device options for LUKS. |
| 3352 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3353 | # @key-secret: the ID of a QCryptoSecret object providing the |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 3354 | # decryption key (since 2.6). Mandatory except when doing a |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3355 | # metadata-only probe of the image. |
Daniel P. Berrange | 7836857 | 2016-03-21 14:11:47 +0000 | [diff] [blame] | 3356 | # |
Markus Armbruster | 5305a4e | 2024-03-22 15:09:09 +0100 | [diff] [blame] | 3357 | # @header: block device holding a detached LUKS header. (since 9.0) |
Hyman Huang | 9ad5c4e | 2024-01-30 13:37:19 +0800 | [diff] [blame] | 3358 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3359 | # Since: 2.9 |
Daniel P. Berrange | 7836857 | 2016-03-21 14:11:47 +0000 | [diff] [blame] | 3360 | ## |
| 3361 | { 'struct': 'BlockdevOptionsLUKS', |
| 3362 | 'base': 'BlockdevOptionsGenericFormat', |
Hyman Huang | 9ad5c4e | 2024-01-30 13:37:19 +0800 | [diff] [blame] | 3363 | 'data': { '*key-secret': 'str', |
| 3364 | '*header': 'BlockdevRef'} } |
Daniel P. Berrange | 7836857 | 2016-03-21 14:11:47 +0000 | [diff] [blame] | 3365 | |
Daniel P. Berrange | 7836857 | 2016-03-21 14:11:47 +0000 | [diff] [blame] | 3366 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3367 | # @BlockdevOptionsGenericCOWFormat: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3368 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3369 | # Driver specific block device options for image format that have no |
| 3370 | # option besides their data source and an optional backing file. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3371 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3372 | # @backing: reference to or definition of the backing file block |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3373 | # device, null disables the backing file entirely. Defaults to |
| 3374 | # the backing file stored the image file. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3375 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3376 | # Since: 2.9 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3377 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 3378 | { 'struct': 'BlockdevOptionsGenericCOWFormat', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3379 | 'base': 'BlockdevOptionsGenericFormat', |
Markus Armbruster | c42e874 | 2017-07-18 08:54:00 +0200 | [diff] [blame] | 3380 | 'data': { '*backing': 'BlockdevRefOrNull' } } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3381 | |
| 3382 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3383 | # @Qcow2OverlapCheckMode: |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3384 | # |
| 3385 | # General overlap check modes. |
| 3386 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3387 | # @none: Do not perform any checks |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3388 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3389 | # @constant: Perform only checks which can be done in constant time |
| 3390 | # and without reading anything from disk |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3391 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3392 | # @cached: Perform only checks which can be done without reading |
| 3393 | # anything from disk |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3394 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3395 | # @all: Perform all available overlap checks |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3396 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3397 | # Since: 2.9 |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3398 | ## |
| 3399 | { 'enum': 'Qcow2OverlapCheckMode', |
| 3400 | 'data': [ 'none', 'constant', 'cached', 'all' ] } |
| 3401 | |
| 3402 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3403 | # @Qcow2OverlapCheckFlags: |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3404 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3405 | # Structure of flags for each metadata structure. Setting a field to |
Vladimir Sementsov-Ogievskiy | 125f973 | 2024-03-25 15:00:54 +0300 | [diff] [blame] | 3406 | # 'true' makes QEMU guard that Qcow2 format structure against |
| 3407 | # unintended overwriting. See Qcow2 format specification for detailed |
| 3408 | # information on these structures. The default value is chosen |
| 3409 | # according to the template given. |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3410 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3411 | # @template: Specifies a template mode which can be adjusted using the |
| 3412 | # other flags, defaults to 'cached' |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3413 | # |
Vladimir Sementsov-Ogievskiy | 125f973 | 2024-03-25 15:00:54 +0300 | [diff] [blame] | 3414 | # @main-header: Qcow2 format header |
| 3415 | # |
| 3416 | # @active-l1: Qcow2 active L1 table |
| 3417 | # |
| 3418 | # @active-l2: Qcow2 active L2 table |
| 3419 | # |
| 3420 | # @refcount-table: Qcow2 refcount table |
| 3421 | # |
| 3422 | # @refcount-block: Qcow2 refcount blocks |
| 3423 | # |
| 3424 | # @snapshot-table: Qcow2 snapshot table |
| 3425 | # |
| 3426 | # @inactive-l1: Qcow2 inactive L1 tables |
| 3427 | # |
| 3428 | # @inactive-l2: Qcow2 inactive L2 tables |
| 3429 | # |
| 3430 | # @bitmap-directory: Qcow2 bitmap directory (since 3.0) |
Vladimir Sementsov-Ogievskiy | 0e4e431 | 2018-07-05 18:15:15 +0300 | [diff] [blame] | 3431 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3432 | # Since: 2.9 |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3433 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 3434 | { 'struct': 'Qcow2OverlapCheckFlags', |
Vladimir Sementsov-Ogievskiy | 0e4e431 | 2018-07-05 18:15:15 +0300 | [diff] [blame] | 3435 | 'data': { '*template': 'Qcow2OverlapCheckMode', |
| 3436 | '*main-header': 'bool', |
| 3437 | '*active-l1': 'bool', |
| 3438 | '*active-l2': 'bool', |
| 3439 | '*refcount-table': 'bool', |
| 3440 | '*refcount-block': 'bool', |
| 3441 | '*snapshot-table': 'bool', |
| 3442 | '*inactive-l1': 'bool', |
| 3443 | '*inactive-l2': 'bool', |
| 3444 | '*bitmap-directory': 'bool' } } |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3445 | |
| 3446 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3447 | # @Qcow2OverlapChecks: |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3448 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3449 | # Specifies which metadata structures should be guarded against |
| 3450 | # unintended overwriting. |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3451 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3452 | # @flags: set of flags for separate specification of each metadata |
| 3453 | # structure type |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3454 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3455 | # @mode: named mode which chooses a specific set of flags |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3456 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3457 | # Since: 2.9 |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3458 | ## |
Eric Blake | ab916fa | 2015-05-04 09:05:13 -0600 | [diff] [blame] | 3459 | { 'alternate': 'Qcow2OverlapChecks', |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3460 | 'data': { 'flags': 'Qcow2OverlapCheckFlags', |
| 3461 | 'mode': 'Qcow2OverlapCheckMode' } } |
| 3462 | |
| 3463 | ## |
Daniel P. Berrange | d85f422 | 2017-06-23 17:24:08 +0100 | [diff] [blame] | 3464 | # @BlockdevQcowEncryptionFormat: |
| 3465 | # |
| 3466 | # @aes: AES-CBC with plain64 initialization vectors |
| 3467 | # |
| 3468 | # Since: 2.10 |
| 3469 | ## |
| 3470 | { 'enum': 'BlockdevQcowEncryptionFormat', |
| 3471 | 'data': [ 'aes' ] } |
| 3472 | |
| 3473 | ## |
| 3474 | # @BlockdevQcowEncryption: |
| 3475 | # |
Markus Armbruster | 89a2273 | 2024-02-05 08:47:09 +0100 | [diff] [blame] | 3476 | # @format: encryption format |
| 3477 | # |
Daniel P. Berrange | d85f422 | 2017-06-23 17:24:08 +0100 | [diff] [blame] | 3478 | # Since: 2.10 |
| 3479 | ## |
| 3480 | { 'union': 'BlockdevQcowEncryption', |
| 3481 | 'base': { 'format': 'BlockdevQcowEncryptionFormat' }, |
| 3482 | 'discriminator': 'format', |
| 3483 | 'data': { 'aes': 'QCryptoBlockOptionsQCow' } } |
| 3484 | |
| 3485 | ## |
| 3486 | # @BlockdevOptionsQcow: |
| 3487 | # |
| 3488 | # Driver specific block device options for qcow. |
| 3489 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3490 | # @encrypt: Image decryption options. Mandatory for encrypted images, |
| 3491 | # except when doing a metadata-only probe of the image. |
Daniel P. Berrange | d85f422 | 2017-06-23 17:24:08 +0100 | [diff] [blame] | 3492 | # |
| 3493 | # Since: 2.10 |
| 3494 | ## |
| 3495 | { 'struct': 'BlockdevOptionsQcow', |
| 3496 | 'base': 'BlockdevOptionsGenericCOWFormat', |
| 3497 | 'data': { '*encrypt': 'BlockdevQcowEncryption' } } |
| 3498 | |
Daniel P. Berrange | b25b387 | 2017-06-23 17:24:10 +0100 | [diff] [blame] | 3499 | ## |
| 3500 | # @BlockdevQcow2EncryptionFormat: |
John Snow | a9e2eb0 | 2021-09-30 16:57:07 -0400 | [diff] [blame] | 3501 | # |
Eric Blake | 58823a0 | 2019-02-06 14:28:48 -0600 | [diff] [blame] | 3502 | # @aes: AES-CBC with plain64 initialization vectors |
Daniel P. Berrange | b25b387 | 2017-06-23 17:24:10 +0100 | [diff] [blame] | 3503 | # |
| 3504 | # Since: 2.10 |
| 3505 | ## |
| 3506 | { 'enum': 'BlockdevQcow2EncryptionFormat', |
Daniel P. Berrange | 4652b8f | 2017-06-23 17:24:12 +0100 | [diff] [blame] | 3507 | 'data': [ 'aes', 'luks' ] } |
Daniel P. Berrange | b25b387 | 2017-06-23 17:24:10 +0100 | [diff] [blame] | 3508 | |
| 3509 | ## |
| 3510 | # @BlockdevQcow2Encryption: |
| 3511 | # |
Markus Armbruster | 89a2273 | 2024-02-05 08:47:09 +0100 | [diff] [blame] | 3512 | # @format: encryption format |
| 3513 | # |
Daniel P. Berrange | b25b387 | 2017-06-23 17:24:10 +0100 | [diff] [blame] | 3514 | # Since: 2.10 |
| 3515 | ## |
| 3516 | { 'union': 'BlockdevQcow2Encryption', |
| 3517 | 'base': { 'format': 'BlockdevQcow2EncryptionFormat' }, |
| 3518 | 'discriminator': 'format', |
Daniel P. Berrange | 4652b8f | 2017-06-23 17:24:12 +0100 | [diff] [blame] | 3519 | 'data': { 'aes': 'QCryptoBlockOptionsQCow', |
| 3520 | 'luks': 'QCryptoBlockOptionsLUKS'} } |
Daniel P. Berrange | b25b387 | 2017-06-23 17:24:10 +0100 | [diff] [blame] | 3521 | |
Daniel P. Berrange | d85f422 | 2017-06-23 17:24:08 +0100 | [diff] [blame] | 3522 | ## |
Vladimir Sementsov-Ogievskiy | 33fa222 | 2020-10-21 17:58:46 +0300 | [diff] [blame] | 3523 | # @BlockdevOptionsPreallocate: |
| 3524 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3525 | # Filter driver intended to be inserted between format and protocol |
| 3526 | # node and do preallocation in protocol node on write. |
Vladimir Sementsov-Ogievskiy | 33fa222 | 2020-10-21 17:58:46 +0300 | [diff] [blame] | 3527 | # |
| 3528 | # @prealloc-align: on preallocation, align file length to this number, |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3529 | # default 1048576 (1M) |
Vladimir Sementsov-Ogievskiy | 33fa222 | 2020-10-21 17:58:46 +0300 | [diff] [blame] | 3530 | # |
| 3531 | # @prealloc-size: how much to preallocate, default 134217728 (128M) |
| 3532 | # |
| 3533 | # Since: 6.0 |
| 3534 | ## |
| 3535 | { 'struct': 'BlockdevOptionsPreallocate', |
| 3536 | 'base': 'BlockdevOptionsGenericFormat', |
| 3537 | 'data': { '*prealloc-align': 'int', '*prealloc-size': 'int' } } |
| 3538 | |
| 3539 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3540 | # @BlockdevOptionsQcow2: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3541 | # |
| 3542 | # Driver specific block device options for qcow2. |
| 3543 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3544 | # @lazy-refcounts: whether to enable the lazy refcounts feature |
| 3545 | # (default is taken from the image file) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3546 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3547 | # @pass-discard-request: whether discard requests to the qcow2 device |
| 3548 | # should be forwarded to the data source |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3549 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 3550 | # @pass-discard-snapshot: whether discard requests for the data source |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3551 | # should be issued when a snapshot operation (e.g. deleting a |
| 3552 | # snapshot) frees clusters in the qcow2 file |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3553 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3554 | # @pass-discard-other: whether discard requests for the data source |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3555 | # should be issued on other occasions where a cluster gets freed |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3556 | # |
Jean-Louis Dupond | b2b1090 | 2023-10-03 14:52:37 +0200 | [diff] [blame] | 3557 | # @discard-no-unref: when enabled, data clusters will remain |
| 3558 | # preallocated when they are no longer used, e.g. because they are |
| 3559 | # discarded or converted to zero clusters. As usual, whether the |
| 3560 | # old data is discarded or kept on the protocol level (i.e. in the |
| 3561 | # image file) depends on the setting of the pass-discard-request |
| 3562 | # option. Keeping the clusters preallocated prevents qcow2 |
| 3563 | # fragmentation that would otherwise be caused by freeing and |
| 3564 | # re-allocating them later. Besides potential performance |
| 3565 | # degradation, such fragmentation can lead to increased allocation |
| 3566 | # of clusters past the end of the image file, resulting in image |
Markus Armbruster | 209e64d | 2024-03-22 15:09:08 +0100 | [diff] [blame] | 3567 | # files whose file length can grow much larger than their guest |
| 3568 | # disk size would suggest. If image file length is of concern |
| 3569 | # (e.g. when storing qcow2 images directly on block devices), you |
| 3570 | # should consider enabling this option. (since 8.1) |
Jean-Louis Dupond | 42a2890 | 2023-06-05 10:45:24 +0200 | [diff] [blame] | 3571 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3572 | # @overlap-check: which overlap checks to perform for writes to the |
| 3573 | # image, defaults to 'cached' (since 2.2) |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3574 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3575 | # @cache-size: the maximum total size of the L2 table and refcount |
| 3576 | # block caches in bytes (since 2.2) |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3577 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3578 | # @l2-cache-size: the maximum size of the L2 table cache in bytes |
| 3579 | # (since 2.2) |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3580 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3581 | # @l2-cache-entry-size: the size of each entry in the L2 cache in |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3582 | # bytes. It must be a power of two between 512 and the cluster |
| 3583 | # size. The default value is the cluster size (since 2.12) |
Alberto Garcia | 1221fe6 | 2018-02-05 16:33:36 +0200 | [diff] [blame] | 3584 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3585 | # @refcount-cache-size: the maximum size of the refcount block cache |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3586 | # in bytes (since 2.2) |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3587 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3588 | # @cache-clean-interval: clean unused entries in the L2 and refcount |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3589 | # caches. The interval is in seconds. The default value is 600 |
| 3590 | # on supporting platforms, and 0 on other platforms. 0 disables |
| 3591 | # this feature. (since 2.5) |
Leonid Bloch | e957b50 | 2018-09-26 19:04:46 +0300 | [diff] [blame] | 3592 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3593 | # @encrypt: Image decryption options. Mandatory for encrypted images, |
| 3594 | # except when doing a metadata-only probe of the image. (since |
| 3595 | # 2.10) |
Alberto Garcia | 279621c | 2015-08-04 15:14:40 +0300 | [diff] [blame] | 3596 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3597 | # @data-file: reference to or definition of the external data file. |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3598 | # This may only be specified for images that require an external |
| 3599 | # data file. If it is not specified for such an image, the data |
| 3600 | # file name is loaded from the image file. (since 4.0) |
Kevin Wolf | 0e8c08b | 2019-01-29 17:13:57 +0100 | [diff] [blame] | 3601 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3602 | # Since: 2.9 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3603 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 3604 | { 'struct': 'BlockdevOptionsQcow2', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3605 | 'base': 'BlockdevOptionsGenericCOWFormat', |
| 3606 | 'data': { '*lazy-refcounts': 'bool', |
| 3607 | '*pass-discard-request': 'bool', |
| 3608 | '*pass-discard-snapshot': 'bool', |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3609 | '*pass-discard-other': 'bool', |
Jean-Louis Dupond | 42a2890 | 2023-06-05 10:45:24 +0200 | [diff] [blame] | 3610 | '*discard-no-unref': 'bool', |
Max Reitz | f658581 | 2014-08-20 19:59:36 +0200 | [diff] [blame] | 3611 | '*overlap-check': 'Qcow2OverlapChecks', |
| 3612 | '*cache-size': 'int', |
| 3613 | '*l2-cache-size': 'int', |
Alberto Garcia | 1221fe6 | 2018-02-05 16:33:36 +0200 | [diff] [blame] | 3614 | '*l2-cache-entry-size': 'int', |
Alberto Garcia | 279621c | 2015-08-04 15:14:40 +0300 | [diff] [blame] | 3615 | '*refcount-cache-size': 'int', |
Daniel P. Berrange | b25b387 | 2017-06-23 17:24:10 +0100 | [diff] [blame] | 3616 | '*cache-clean-interval': 'int', |
Kevin Wolf | 0e8c08b | 2019-01-29 17:13:57 +0100 | [diff] [blame] | 3617 | '*encrypt': 'BlockdevQcow2Encryption', |
| 3618 | '*data-file': 'BlockdevRef' } } |
Chrysostomos Nanakos | b1de5f4 | 2014-07-30 20:59:09 +0300 | [diff] [blame] | 3619 | |
| 3620 | ## |
Kevin Wolf | ec2f541 | 2018-02-05 14:59:05 +0100 | [diff] [blame] | 3621 | # @SshHostKeyCheckMode: |
| 3622 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 3623 | # @none: Don't check the host key at all |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3624 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 3625 | # @hash: Compare the host key with a given hash |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3626 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 3627 | # @known_hosts: Check the host key against the known_hosts file |
Kevin Wolf | ec2f541 | 2018-02-05 14:59:05 +0100 | [diff] [blame] | 3628 | # |
| 3629 | # Since: 2.12 |
| 3630 | ## |
| 3631 | { 'enum': 'SshHostKeyCheckMode', |
| 3632 | 'data': [ 'none', 'hash', 'known_hosts' ] } |
| 3633 | |
| 3634 | ## |
| 3635 | # @SshHostKeyCheckHashType: |
| 3636 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 3637 | # @md5: The given hash is an md5 hash |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3638 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 3639 | # @sha1: The given hash is an sha1 hash |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3640 | # |
Daniel P. Berrangé | bf78326 | 2021-06-22 12:51:56 +0100 | [diff] [blame] | 3641 | # @sha256: The given hash is an sha256 hash |
Kevin Wolf | ec2f541 | 2018-02-05 14:59:05 +0100 | [diff] [blame] | 3642 | # |
| 3643 | # Since: 2.12 |
| 3644 | ## |
| 3645 | { 'enum': 'SshHostKeyCheckHashType', |
Daniel P. Berrangé | bf78326 | 2021-06-22 12:51:56 +0100 | [diff] [blame] | 3646 | 'data': [ 'md5', 'sha1', 'sha256' ] } |
Kevin Wolf | ec2f541 | 2018-02-05 14:59:05 +0100 | [diff] [blame] | 3647 | |
| 3648 | ## |
| 3649 | # @SshHostKeyHash: |
| 3650 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 3651 | # @type: The hash algorithm used for the hash |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3652 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 3653 | # @hash: The expected hash value |
Kevin Wolf | ec2f541 | 2018-02-05 14:59:05 +0100 | [diff] [blame] | 3654 | # |
| 3655 | # Since: 2.12 |
| 3656 | ## |
| 3657 | { 'struct': 'SshHostKeyHash', |
| 3658 | 'data': { 'type': 'SshHostKeyCheckHashType', |
| 3659 | 'hash': 'str' }} |
| 3660 | |
| 3661 | ## |
Kevin Wolf | ec2f541 | 2018-02-05 14:59:05 +0100 | [diff] [blame] | 3662 | # @SshHostKeyCheck: |
| 3663 | # |
Markus Armbruster | 89a2273 | 2024-02-05 08:47:09 +0100 | [diff] [blame] | 3664 | # @mode: How to check the host key |
| 3665 | # |
Kevin Wolf | ec2f541 | 2018-02-05 14:59:05 +0100 | [diff] [blame] | 3666 | # Since: 2.12 |
| 3667 | ## |
| 3668 | { 'union': 'SshHostKeyCheck', |
| 3669 | 'base': { 'mode': 'SshHostKeyCheckMode' }, |
| 3670 | 'discriminator': 'mode', |
Anton Nefedov | 29cd040 | 2018-06-18 11:40:06 +0300 | [diff] [blame] | 3671 | 'data': { 'hash': 'SshHostKeyHash' } } |
Kevin Wolf | ec2f541 | 2018-02-05 14:59:05 +0100 | [diff] [blame] | 3672 | |
| 3673 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3674 | # @BlockdevOptionsSsh: |
Ashijeet Acharya | ad0e90a | 2016-10-25 18:34:01 +0530 | [diff] [blame] | 3675 | # |
Andrea Bolognani | c0ac533 | 2022-05-03 09:37:36 +0200 | [diff] [blame] | 3676 | # @server: host address |
Ashijeet Acharya | ad0e90a | 2016-10-25 18:34:01 +0530 | [diff] [blame] | 3677 | # |
Andrea Bolognani | c0ac533 | 2022-05-03 09:37:36 +0200 | [diff] [blame] | 3678 | # @path: path to the image on the host |
Ashijeet Acharya | ad0e90a | 2016-10-25 18:34:01 +0530 | [diff] [blame] | 3679 | # |
Andrea Bolognani | c0ac533 | 2022-05-03 09:37:36 +0200 | [diff] [blame] | 3680 | # @user: user as which to connect, defaults to current local user name |
Ashijeet Acharya | ad0e90a | 2016-10-25 18:34:01 +0530 | [diff] [blame] | 3681 | # |
Andrea Bolognani | c0ac533 | 2022-05-03 09:37:36 +0200 | [diff] [blame] | 3682 | # @host-key-check: Defines how and what to check the host key against |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3683 | # (default: known_hosts) |
Ashijeet Acharya | ad0e90a | 2016-10-25 18:34:01 +0530 | [diff] [blame] | 3684 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3685 | # Since: 2.9 |
Ashijeet Acharya | ad0e90a | 2016-10-25 18:34:01 +0530 | [diff] [blame] | 3686 | ## |
| 3687 | { 'struct': 'BlockdevOptionsSsh', |
| 3688 | 'data': { 'server': 'InetSocketAddress', |
| 3689 | 'path': 'str', |
Kevin Wolf | ec2f541 | 2018-02-05 14:59:05 +0100 | [diff] [blame] | 3690 | '*user': 'str', |
| 3691 | '*host-key-check': 'SshHostKeyCheck' } } |
Ashijeet Acharya | ad0e90a | 2016-10-25 18:34:01 +0530 | [diff] [blame] | 3692 | |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3693 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3694 | # @BlkdebugEvent: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3695 | # |
| 3696 | # Trigger events supported by blkdebug. |
Eric Blake | a31939e | 2015-11-18 01:52:54 -0700 | [diff] [blame] | 3697 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3698 | # @l1_shrink_write_table: write zeros to the l1 table to shrink image. |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3699 | # (since 2.11) |
Pavel Butsykin | 46b732c | 2017-09-18 15:42:29 +0300 | [diff] [blame] | 3700 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3701 | # @l1_shrink_free_l2_clusters: discard the l2 tables. (since 2.11) |
Pavel Butsykin | 46b732c | 2017-09-18 15:42:29 +0300 | [diff] [blame] | 3702 | # |
Eric Blake | d855ebc | 2017-10-05 14:02:46 -0500 | [diff] [blame] | 3703 | # @cor_write: a write due to copy-on-read (since 2.11) |
| 3704 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3705 | # @cluster_alloc_space: an allocation of file space for a cluster |
| 3706 | # (since 4.1) |
Anton Nefedov | c8bb23c | 2019-05-16 17:27:49 +0300 | [diff] [blame] | 3707 | # |
Max Reitz | f8cec15 | 2019-05-07 22:35:05 +0200 | [diff] [blame] | 3708 | # @none: triggers once at creation of the blkdebug node (since 4.1) |
| 3709 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3710 | # Since: 2.9 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3711 | ## |
Eric Blake | a31939e | 2015-11-18 01:52:54 -0700 | [diff] [blame] | 3712 | { 'enum': 'BlkdebugEvent', 'prefix': 'BLKDBG', |
Eric Blake | 5be5b77 | 2015-11-18 01:52:55 -0700 | [diff] [blame] | 3713 | 'data': [ 'l1_update', 'l1_grow_alloc_table', 'l1_grow_write_table', |
| 3714 | 'l1_grow_activate_table', 'l2_load', 'l2_update', |
| 3715 | 'l2_update_compressed', 'l2_alloc_cow_read', 'l2_alloc_write', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3716 | 'read_aio', 'read_backing_aio', 'read_compressed', 'write_aio', |
| 3717 | 'write_compressed', 'vmstate_load', 'vmstate_save', 'cow_read', |
| 3718 | 'cow_write', 'reftable_load', 'reftable_grow', 'reftable_update', |
| 3719 | 'refblock_load', 'refblock_update', 'refblock_update_part', |
Eric Blake | 5be5b77 | 2015-11-18 01:52:55 -0700 | [diff] [blame] | 3720 | 'refblock_alloc', 'refblock_alloc_hookup', 'refblock_alloc_write', |
| 3721 | 'refblock_alloc_write_blocks', 'refblock_alloc_write_table', |
| 3722 | 'refblock_alloc_switch_table', 'cluster_alloc', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3723 | 'cluster_alloc_bytes', 'cluster_free', 'flush_to_os', |
Eric Blake | 5be5b77 | 2015-11-18 01:52:55 -0700 | [diff] [blame] | 3724 | 'flush_to_disk', 'pwritev_rmw_head', 'pwritev_rmw_after_head', |
| 3725 | 'pwritev_rmw_tail', 'pwritev_rmw_after_tail', 'pwritev', |
Pavel Butsykin | 46b732c | 2017-09-18 15:42:29 +0300 | [diff] [blame] | 3726 | 'pwritev_zero', 'pwritev_done', 'empty_image_prepare', |
Eric Blake | d855ebc | 2017-10-05 14:02:46 -0500 | [diff] [blame] | 3727 | 'l1_shrink_write_table', 'l1_shrink_free_l2_clusters', |
Max Reitz | f8cec15 | 2019-05-07 22:35:05 +0200 | [diff] [blame] | 3728 | 'cor_write', 'cluster_alloc_space', 'none'] } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3729 | |
| 3730 | ## |
Max Reitz | 16789db | 2019-05-07 22:35:04 +0200 | [diff] [blame] | 3731 | # @BlkdebugIOType: |
| 3732 | # |
| 3733 | # Kinds of I/O that blkdebug can inject errors in. |
| 3734 | # |
| 3735 | # @read: .bdrv_co_preadv() |
| 3736 | # |
| 3737 | # @write: .bdrv_co_pwritev() |
| 3738 | # |
| 3739 | # @write-zeroes: .bdrv_co_pwrite_zeroes() |
| 3740 | # |
| 3741 | # @discard: .bdrv_co_pdiscard() |
| 3742 | # |
| 3743 | # @flush: .bdrv_co_flush_to_disk() |
| 3744 | # |
Max Reitz | 1adb0b5 | 2019-05-07 22:35:06 +0200 | [diff] [blame] | 3745 | # @block-status: .bdrv_co_block_status() |
| 3746 | # |
Max Reitz | 16789db | 2019-05-07 22:35:04 +0200 | [diff] [blame] | 3747 | # Since: 4.1 |
| 3748 | ## |
| 3749 | { 'enum': 'BlkdebugIOType', 'prefix': 'BLKDEBUG_IO_TYPE', |
Max Reitz | 1adb0b5 | 2019-05-07 22:35:06 +0200 | [diff] [blame] | 3750 | 'data': [ 'read', 'write', 'write-zeroes', 'discard', 'flush', |
| 3751 | 'block-status' ] } |
Max Reitz | 16789db | 2019-05-07 22:35:04 +0200 | [diff] [blame] | 3752 | |
| 3753 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3754 | # @BlkdebugInjectErrorOptions: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3755 | # |
| 3756 | # Describes a single error injection for blkdebug. |
| 3757 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3758 | # @event: trigger event |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3759 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3760 | # @state: the state identifier blkdebug needs to be in to actually |
| 3761 | # trigger the event; defaults to "any" |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3762 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3763 | # @iotype: the type of I/O operations on which this error should be |
| 3764 | # injected; defaults to "all read, write, write-zeroes, discard, |
| 3765 | # and flush operations" (since: 4.1) |
Max Reitz | 16789db | 2019-05-07 22:35:04 +0200 | [diff] [blame] | 3766 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3767 | # @errno: error identifier (errno) to be returned; defaults to EIO |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3768 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3769 | # @sector: specifies the sector index which has to be affected in |
| 3770 | # order to actually trigger the event; defaults to "any sector" |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3771 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3772 | # @once: disables further events after this one has been triggered; |
| 3773 | # defaults to false |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3774 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 3775 | # @immediately: fail immediately; defaults to false |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3776 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3777 | # Since: 2.9 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3778 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 3779 | { 'struct': 'BlkdebugInjectErrorOptions', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3780 | 'data': { 'event': 'BlkdebugEvent', |
| 3781 | '*state': 'int', |
Max Reitz | 16789db | 2019-05-07 22:35:04 +0200 | [diff] [blame] | 3782 | '*iotype': 'BlkdebugIOType', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3783 | '*errno': 'int', |
| 3784 | '*sector': 'int', |
| 3785 | '*once': 'bool', |
| 3786 | '*immediately': 'bool' } } |
| 3787 | |
| 3788 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3789 | # @BlkdebugSetStateOptions: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3790 | # |
| 3791 | # Describes a single state-change event for blkdebug. |
| 3792 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3793 | # @event: trigger event |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3794 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3795 | # @state: the current state identifier blkdebug needs to be in; |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3796 | # defaults to "any" |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3797 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3798 | # @new_state: the state identifier blkdebug is supposed to assume if |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3799 | # this event is triggered |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3800 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3801 | # Since: 2.9 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3802 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 3803 | { 'struct': 'BlkdebugSetStateOptions', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3804 | 'data': { 'event': 'BlkdebugEvent', |
| 3805 | '*state': 'int', |
| 3806 | 'new_state': 'int' } } |
| 3807 | |
| 3808 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3809 | # @BlockdevOptionsBlkdebug: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3810 | # |
| 3811 | # Driver specific block device options for blkdebug. |
| 3812 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3813 | # @image: underlying raw block device (or image file) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3814 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3815 | # @config: filename of the configuration file |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3816 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3817 | # @align: required alignment for requests in bytes, must be positive |
| 3818 | # power of 2, or 0 for default |
Eric Blake | 430b26a | 2017-04-29 14:14:18 -0500 | [diff] [blame] | 3819 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3820 | # @max-transfer: maximum size for I/O transfers in bytes, must be |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3821 | # positive multiple of @align and of the underlying file's request |
| 3822 | # alignment (but need not be a power of 2), or 0 for default |
| 3823 | # (since 2.10) |
Eric Blake | 430b26a | 2017-04-29 14:14:18 -0500 | [diff] [blame] | 3824 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3825 | # @opt-write-zero: preferred alignment for write zero requests in |
| 3826 | # bytes, must be positive multiple of @align and of the underlying |
| 3827 | # file's request alignment (but need not be a power of 2), or 0 |
| 3828 | # for default (since 2.10) |
Eric Blake | 430b26a | 2017-04-29 14:14:18 -0500 | [diff] [blame] | 3829 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3830 | # @max-write-zero: maximum size for write zero requests in bytes, must |
| 3831 | # be positive multiple of @align, of @opt-write-zero, and of the |
| 3832 | # underlying file's request alignment (but need not be a power of |
| 3833 | # 2), or 0 for default (since 2.10) |
Eric Blake | 430b26a | 2017-04-29 14:14:18 -0500 | [diff] [blame] | 3834 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3835 | # @opt-discard: preferred alignment for discard requests in bytes, |
| 3836 | # must be positive multiple of @align and of the underlying file's |
| 3837 | # request alignment (but need not be a power of 2), or 0 for |
| 3838 | # default (since 2.10) |
Eric Blake | 430b26a | 2017-04-29 14:14:18 -0500 | [diff] [blame] | 3839 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3840 | # @max-discard: maximum size for discard requests in bytes, must be |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3841 | # positive multiple of @align, of @opt-discard, and of the |
| 3842 | # underlying file's request alignment (but need not be a power of |
| 3843 | # 2), or 0 for default (since 2.10) |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3844 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3845 | # @inject-error: array of error injection descriptions |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3846 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3847 | # @set-state: array of state-change descriptions |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3848 | # |
Max Reitz | 69c6449 | 2019-11-08 13:34:53 +0100 | [diff] [blame] | 3849 | # @take-child-perms: Permissions to take on @image in addition to what |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3850 | # is necessary anyway (which depends on how the blkdebug node is |
| 3851 | # used). Defaults to none. (since 5.0) |
Max Reitz | 69c6449 | 2019-11-08 13:34:53 +0100 | [diff] [blame] | 3852 | # |
| 3853 | # @unshare-child-perms: Permissions not to share on @image in addition |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3854 | # to what cannot be shared anyway (which depends on how the |
| 3855 | # blkdebug node is used). Defaults to none. (since 5.0) |
Max Reitz | 69c6449 | 2019-11-08 13:34:53 +0100 | [diff] [blame] | 3856 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3857 | # Since: 2.9 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3858 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 3859 | { 'struct': 'BlockdevOptionsBlkdebug', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3860 | 'data': { 'image': 'BlockdevRef', |
| 3861 | '*config': 'str', |
Eric Blake | 430b26a | 2017-04-29 14:14:18 -0500 | [diff] [blame] | 3862 | '*align': 'int', '*max-transfer': 'int32', |
| 3863 | '*opt-write-zero': 'int32', '*max-write-zero': 'int32', |
| 3864 | '*opt-discard': 'int32', '*max-discard': 'int32', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3865 | '*inject-error': ['BlkdebugInjectErrorOptions'], |
Max Reitz | 69c6449 | 2019-11-08 13:34:53 +0100 | [diff] [blame] | 3866 | '*set-state': ['BlkdebugSetStateOptions'], |
| 3867 | '*take-child-perms': ['BlockPermission'], |
| 3868 | '*unshare-child-perms': ['BlockPermission'] } } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3869 | |
| 3870 | ## |
Aapo Vienamo | bfcc224 | 2018-07-03 17:48:48 +0300 | [diff] [blame] | 3871 | # @BlockdevOptionsBlklogwrites: |
| 3872 | # |
| 3873 | # Driver specific block device options for blklogwrites. |
| 3874 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3875 | # @file: block device |
Aapo Vienamo | bfcc224 | 2018-07-03 17:48:48 +0300 | [diff] [blame] | 3876 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3877 | # @log: block device used to log writes to @file |
Aapo Vienamo | bfcc224 | 2018-07-03 17:48:48 +0300 | [diff] [blame] | 3878 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3879 | # @log-sector-size: sector size used in logging writes to @file, |
| 3880 | # determines granularity of offsets and sizes of writes |
| 3881 | # (default: 512) |
Aapo Vienamo | bfcc224 | 2018-07-03 17:48:48 +0300 | [diff] [blame] | 3882 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3883 | # @log-append: append to an existing log (default: false) |
Ari Sundholm | 7769eaa | 2018-07-06 17:01:36 +0300 | [diff] [blame] | 3884 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3885 | # @log-super-update-interval: interval of write requests after which |
| 3886 | # the log super block is updated to disk (default: 4096) |
Ari Sundholm | 1dce698 | 2018-07-04 17:59:36 +0300 | [diff] [blame] | 3887 | # |
Aapo Vienamo | bfcc224 | 2018-07-03 17:48:48 +0300 | [diff] [blame] | 3888 | # Since: 3.0 |
| 3889 | ## |
| 3890 | { 'struct': 'BlockdevOptionsBlklogwrites', |
| 3891 | 'data': { 'file': 'BlockdevRef', |
| 3892 | 'log': 'BlockdevRef', |
Ari Sundholm | 0878b3c | 2018-07-04 17:59:35 +0300 | [diff] [blame] | 3893 | '*log-sector-size': 'uint32', |
Ari Sundholm | 1dce698 | 2018-07-04 17:59:36 +0300 | [diff] [blame] | 3894 | '*log-append': 'bool', |
| 3895 | '*log-super-update-interval': 'uint64' } } |
Aapo Vienamo | bfcc224 | 2018-07-03 17:48:48 +0300 | [diff] [blame] | 3896 | |
| 3897 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3898 | # @BlockdevOptionsBlkverify: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3899 | # |
| 3900 | # Driver specific block device options for blkverify. |
| 3901 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3902 | # @test: block device to be tested |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3903 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3904 | # @raw: raw image used for verification |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3905 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3906 | # Since: 2.9 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3907 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 3908 | { 'struct': 'BlockdevOptionsBlkverify', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3909 | 'data': { 'test': 'BlockdevRef', |
| 3910 | 'raw': 'BlockdevRef' } } |
| 3911 | |
| 3912 | ## |
Pavel Dovgalyuk | 35e32d9 | 2019-10-16 11:40:39 +0300 | [diff] [blame] | 3913 | # @BlockdevOptionsBlkreplay: |
| 3914 | # |
| 3915 | # Driver specific block device options for blkreplay. |
| 3916 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3917 | # @image: disk image which should be controlled with blkreplay |
Pavel Dovgalyuk | 35e32d9 | 2019-10-16 11:40:39 +0300 | [diff] [blame] | 3918 | # |
| 3919 | # Since: 4.2 |
| 3920 | ## |
| 3921 | { 'struct': 'BlockdevOptionsBlkreplay', |
| 3922 | 'data': { 'image': 'BlockdevRef' } } |
| 3923 | |
| 3924 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3925 | # @QuorumReadPattern: |
Liu Yuan | 62c6031 | 2014-08-18 17:41:04 +0800 | [diff] [blame] | 3926 | # |
| 3927 | # An enumeration of quorum read patterns. |
| 3928 | # |
| 3929 | # @quorum: read all the children and do a quorum vote on reads |
| 3930 | # |
| 3931 | # @fifo: read only from the first child that has not failed |
| 3932 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3933 | # Since: 2.9 |
Liu Yuan | 62c6031 | 2014-08-18 17:41:04 +0800 | [diff] [blame] | 3934 | ## |
| 3935 | { 'enum': 'QuorumReadPattern', 'data': [ 'quorum', 'fifo' ] } |
| 3936 | |
| 3937 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3938 | # @BlockdevOptionsQuorum: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3939 | # |
| 3940 | # Driver specific block device options for Quorum |
| 3941 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3942 | # @blkverify: true if the driver must print content mismatch set to |
| 3943 | # false by default |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3944 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3945 | # @children: the children block devices to use |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3946 | # |
| 3947 | # @vote-threshold: the vote limit under which a read will fail |
| 3948 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 3949 | # @rewrite-corrupted: rewrite corrupted data when quorum is reached |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3950 | # (Since 2.1) |
Benoît Canet | cf29a57 | 2014-06-11 15:24:10 +0200 | [diff] [blame] | 3951 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 3952 | # @read-pattern: choose read pattern and set to quorum by default |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3953 | # (Since 2.2) |
Liu Yuan | 62c6031 | 2014-08-18 17:41:04 +0800 | [diff] [blame] | 3954 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3955 | # Since: 2.9 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3956 | ## |
Eric Blake | 895a2a8 | 2015-05-04 09:05:27 -0600 | [diff] [blame] | 3957 | { 'struct': 'BlockdevOptionsQuorum', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3958 | 'data': { '*blkverify': 'bool', |
| 3959 | 'children': [ 'BlockdevRef' ], |
Liu Yuan | 62c6031 | 2014-08-18 17:41:04 +0800 | [diff] [blame] | 3960 | 'vote-threshold': 'int', |
| 3961 | '*rewrite-corrupted': 'bool', |
| 3962 | '*read-pattern': 'QuorumReadPattern' } } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 3963 | |
| 3964 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 3965 | # @BlockdevOptionsGluster: |
Prasanna Kumar Kalever | 7edac2d | 2016-07-19 22:27:32 +0530 | [diff] [blame] | 3966 | # |
| 3967 | # Driver specific block device options for Gluster |
| 3968 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3969 | # @volume: name of gluster volume where VM image resides |
Prasanna Kumar Kalever | 7edac2d | 2016-07-19 22:27:32 +0530 | [diff] [blame] | 3970 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3971 | # @path: absolute path to image file in gluster volume |
Prasanna Kumar Kalever | 7edac2d | 2016-07-19 22:27:32 +0530 | [diff] [blame] | 3972 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3973 | # @server: gluster servers description |
Prasanna Kumar Kalever | 7edac2d | 2016-07-19 22:27:32 +0530 | [diff] [blame] | 3974 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 3975 | # @debug: libgfapi log level (default '4' which is Error) (Since 2.8) |
Prasanna Kumar Kalever | 7edac2d | 2016-07-19 22:27:32 +0530 | [diff] [blame] | 3976 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 3977 | # @logfile: libgfapi log file (default /dev/stderr) (Since 2.8) |
Prasanna Kumar Kalever | e9db8ff | 2016-07-22 20:26:48 +0530 | [diff] [blame] | 3978 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 3979 | # Since: 2.9 |
Prasanna Kumar Kalever | 7edac2d | 2016-07-19 22:27:32 +0530 | [diff] [blame] | 3980 | ## |
| 3981 | { 'struct': 'BlockdevOptionsGluster', |
| 3982 | 'data': { 'volume': 'str', |
| 3983 | 'path': 'str', |
Markus Armbruster | 62cf396 | 2017-04-26 09:36:40 +0200 | [diff] [blame] | 3984 | 'server': ['SocketAddress'], |
Prasanna Kumar Kalever | 1a417e4 | 2016-11-02 22:20:36 +0530 | [diff] [blame] | 3985 | '*debug': 'int', |
Prasanna Kumar Kalever | e9db8ff | 2016-07-22 20:26:48 +0530 | [diff] [blame] | 3986 | '*logfile': 'str' } } |
Prasanna Kumar Kalever | 7edac2d | 2016-07-19 22:27:32 +0530 | [diff] [blame] | 3987 | |
| 3988 | ## |
Stefan Hajnoczi | fd66dbd | 2022-10-13 14:58:57 -0400 | [diff] [blame] | 3989 | # @BlockdevOptionsIoUring: |
| 3990 | # |
| 3991 | # Driver specific block device options for the io_uring backend. |
| 3992 | # |
| 3993 | # @filename: path to the image file |
| 3994 | # |
| 3995 | # Since: 7.2 |
| 3996 | ## |
| 3997 | { 'struct': 'BlockdevOptionsIoUring', |
| 3998 | 'data': { 'filename': 'str' }, |
| 3999 | 'if': 'CONFIG_BLKIO' } |
| 4000 | |
| 4001 | ## |
| 4002 | # @BlockdevOptionsNvmeIoUring: |
| 4003 | # |
| 4004 | # Driver specific block device options for the nvme-io_uring backend. |
| 4005 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4006 | # @path: path to the NVMe namespace's character device (e.g. |
| 4007 | # /dev/ng0n1). |
Stefan Hajnoczi | fd66dbd | 2022-10-13 14:58:57 -0400 | [diff] [blame] | 4008 | # |
| 4009 | # Since: 7.2 |
| 4010 | ## |
| 4011 | { 'struct': 'BlockdevOptionsNvmeIoUring', |
Alberto Faria | 6c32fc0 | 2022-10-29 00:38:54 +0100 | [diff] [blame] | 4012 | 'data': { 'path': 'str' }, |
Stefan Hajnoczi | fd66dbd | 2022-10-13 14:58:57 -0400 | [diff] [blame] | 4013 | 'if': 'CONFIG_BLKIO' } |
| 4014 | |
| 4015 | ## |
Alberto Faria | 03d9e4c | 2022-10-28 14:16:35 +0100 | [diff] [blame] | 4016 | # @BlockdevOptionsVirtioBlkVfioPci: |
| 4017 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4018 | # Driver specific block device options for the virtio-blk-vfio-pci |
| 4019 | # backend. |
Alberto Faria | 03d9e4c | 2022-10-28 14:16:35 +0100 | [diff] [blame] | 4020 | # |
| 4021 | # @path: path to the PCI device's sysfs directory (e.g. |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4022 | # /sys/bus/pci/devices/0000:00:01.0). |
Alberto Faria | 03d9e4c | 2022-10-28 14:16:35 +0100 | [diff] [blame] | 4023 | # |
| 4024 | # Since: 7.2 |
| 4025 | ## |
| 4026 | { 'struct': 'BlockdevOptionsVirtioBlkVfioPci', |
| 4027 | 'data': { 'path': 'str' }, |
| 4028 | 'if': 'CONFIG_BLKIO' } |
| 4029 | |
| 4030 | ## |
Stefan Hajnoczi | fd66dbd | 2022-10-13 14:58:57 -0400 | [diff] [blame] | 4031 | # @BlockdevOptionsVirtioBlkVhostUser: |
| 4032 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4033 | # Driver specific block device options for the virtio-blk-vhost-user |
| 4034 | # backend. |
Stefan Hajnoczi | fd66dbd | 2022-10-13 14:58:57 -0400 | [diff] [blame] | 4035 | # |
| 4036 | # @path: path to the vhost-user UNIX domain socket. |
| 4037 | # |
| 4038 | # Since: 7.2 |
| 4039 | ## |
| 4040 | { 'struct': 'BlockdevOptionsVirtioBlkVhostUser', |
| 4041 | 'data': { 'path': 'str' }, |
| 4042 | 'if': 'CONFIG_BLKIO' } |
| 4043 | |
| 4044 | ## |
| 4045 | # @BlockdevOptionsVirtioBlkVhostVdpa: |
| 4046 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4047 | # Driver specific block device options for the virtio-blk-vhost-vdpa |
| 4048 | # backend. |
Stefan Hajnoczi | fd66dbd | 2022-10-13 14:58:57 -0400 | [diff] [blame] | 4049 | # |
| 4050 | # @path: path to the vhost-vdpa character device. |
| 4051 | # |
Stefano Garzarella | 98b126f | 2023-05-30 09:19:41 +0200 | [diff] [blame] | 4052 | # Features: |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 4053 | # |
Stefano Garzarella | 98b126f | 2023-05-30 09:19:41 +0200 | [diff] [blame] | 4054 | # @fdset: Member @path supports the special "/dev/fdset/N" path |
| 4055 | # (since 8.1) |
| 4056 | # |
Stefan Hajnoczi | fd66dbd | 2022-10-13 14:58:57 -0400 | [diff] [blame] | 4057 | # Since: 7.2 |
| 4058 | ## |
| 4059 | { 'struct': 'BlockdevOptionsVirtioBlkVhostVdpa', |
| 4060 | 'data': { 'path': 'str' }, |
Stefano Garzarella | 98b126f | 2023-05-30 09:19:41 +0200 | [diff] [blame] | 4061 | 'features': [ { 'name' :'fdset', |
| 4062 | 'if': 'CONFIG_BLKIO_VHOST_VDPA_FD' } ], |
Stefan Hajnoczi | fd66dbd | 2022-10-13 14:58:57 -0400 | [diff] [blame] | 4063 | 'if': 'CONFIG_BLKIO' } |
| 4064 | |
| 4065 | ## |
Kevin Wolf | 31eb120 | 2016-12-08 14:23:11 +0100 | [diff] [blame] | 4066 | # @IscsiTransport: |
| 4067 | # |
| 4068 | # An enumeration of libiscsi transport types |
| 4069 | # |
| 4070 | # Since: 2.9 |
| 4071 | ## |
| 4072 | { 'enum': 'IscsiTransport', |
| 4073 | 'data': [ 'tcp', 'iser' ] } |
| 4074 | |
| 4075 | ## |
| 4076 | # @IscsiHeaderDigest: |
| 4077 | # |
| 4078 | # An enumeration of header digests supported by libiscsi |
| 4079 | # |
| 4080 | # Since: 2.9 |
| 4081 | ## |
| 4082 | { 'enum': 'IscsiHeaderDigest', |
| 4083 | 'prefix': 'QAPI_ISCSI_HEADER_DIGEST', |
| 4084 | 'data': [ 'crc32c', 'none', 'crc32c-none', 'none-crc32c' ] } |
| 4085 | |
| 4086 | ## |
| 4087 | # @BlockdevOptionsIscsi: |
| 4088 | # |
Markus Armbruster | d6a5ca3 | 2024-01-29 12:50:07 +0100 | [diff] [blame] | 4089 | # Driver specific block device options for iscsi |
| 4090 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4091 | # @transport: The iscsi transport type |
Kevin Wolf | 31eb120 | 2016-12-08 14:23:11 +0100 | [diff] [blame] | 4092 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4093 | # @portal: The address of the iscsi portal |
Kevin Wolf | 31eb120 | 2016-12-08 14:23:11 +0100 | [diff] [blame] | 4094 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4095 | # @target: The target iqn name |
Kevin Wolf | 31eb120 | 2016-12-08 14:23:11 +0100 | [diff] [blame] | 4096 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4097 | # @lun: LUN to connect to. Defaults to 0. |
Kevin Wolf | 31eb120 | 2016-12-08 14:23:11 +0100 | [diff] [blame] | 4098 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4099 | # @user: User name to log in with. If omitted, no CHAP authentication |
| 4100 | # is performed. |
Kevin Wolf | 31eb120 | 2016-12-08 14:23:11 +0100 | [diff] [blame] | 4101 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4102 | # @password-secret: The ID of a QCryptoSecret object providing the |
| 4103 | # password for the login. This option is required if @user is |
| 4104 | # specified. |
Kevin Wolf | 31eb120 | 2016-12-08 14:23:11 +0100 | [diff] [blame] | 4105 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4106 | # @initiator-name: The iqn name we want to identify to the target as. |
| 4107 | # If this option is not specified, an initiator name is generated |
| 4108 | # automatically. |
Kevin Wolf | 31eb120 | 2016-12-08 14:23:11 +0100 | [diff] [blame] | 4109 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4110 | # @header-digest: The desired header digest. Defaults to none-crc32c. |
Kevin Wolf | 31eb120 | 2016-12-08 14:23:11 +0100 | [diff] [blame] | 4111 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4112 | # @timeout: Timeout in seconds after which a request will timeout. 0 |
| 4113 | # means no timeout and is the default. |
Kevin Wolf | 31eb120 | 2016-12-08 14:23:11 +0100 | [diff] [blame] | 4114 | # |
Kevin Wolf | 31eb120 | 2016-12-08 14:23:11 +0100 | [diff] [blame] | 4115 | # Since: 2.9 |
| 4116 | ## |
| 4117 | { 'struct': 'BlockdevOptionsIscsi', |
| 4118 | 'data': { 'transport': 'IscsiTransport', |
| 4119 | 'portal': 'str', |
| 4120 | 'target': 'str', |
| 4121 | '*lun': 'int', |
| 4122 | '*user': 'str', |
| 4123 | '*password-secret': 'str', |
| 4124 | '*initiator-name': 'str', |
| 4125 | '*header-digest': 'IscsiHeaderDigest', |
| 4126 | '*timeout': 'int' } } |
| 4127 | |
Jeff Cody | 0a55679 | 2017-02-27 12:36:46 -0500 | [diff] [blame] | 4128 | ## |
Markus Armbruster | a3699de | 2018-06-14 21:14:42 +0200 | [diff] [blame] | 4129 | # @RbdAuthMode: |
| 4130 | # |
| 4131 | # Since: 3.0 |
| 4132 | ## |
| 4133 | { 'enum': 'RbdAuthMode', |
| 4134 | 'data': [ 'cephx', 'none' ] } |
| 4135 | |
| 4136 | ## |
Or Ozeri | 42e4ac9 | 2021-06-27 14:46:35 +0300 | [diff] [blame] | 4137 | # @RbdImageEncryptionFormat: |
| 4138 | # |
Or Ozeri | b8f218e | 2023-01-29 05:31:19 -0600 | [diff] [blame] | 4139 | # @luks-any: Used for opening either luks or luks2 (Since 8.0) |
| 4140 | # |
Or Ozeri | 42e4ac9 | 2021-06-27 14:46:35 +0300 | [diff] [blame] | 4141 | # Since: 6.1 |
| 4142 | ## |
| 4143 | { 'enum': 'RbdImageEncryptionFormat', |
Or Ozeri | b8f218e | 2023-01-29 05:31:19 -0600 | [diff] [blame] | 4144 | 'data': [ 'luks', 'luks2', 'luks-any' ] } |
Or Ozeri | 42e4ac9 | 2021-06-27 14:46:35 +0300 | [diff] [blame] | 4145 | |
| 4146 | ## |
| 4147 | # @RbdEncryptionOptionsLUKSBase: |
| 4148 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4149 | # @key-secret: ID of a QCryptoSecret object providing a passphrase for |
| 4150 | # unlocking the encryption |
Or Ozeri | 42e4ac9 | 2021-06-27 14:46:35 +0300 | [diff] [blame] | 4151 | # |
| 4152 | # Since: 6.1 |
| 4153 | ## |
| 4154 | { 'struct': 'RbdEncryptionOptionsLUKSBase', |
| 4155 | 'data': { 'key-secret': 'str' } } |
| 4156 | |
| 4157 | ## |
| 4158 | # @RbdEncryptionCreateOptionsLUKSBase: |
| 4159 | # |
| 4160 | # @cipher-alg: The encryption algorithm |
| 4161 | # |
| 4162 | # Since: 6.1 |
| 4163 | ## |
| 4164 | { 'struct': 'RbdEncryptionCreateOptionsLUKSBase', |
| 4165 | 'base': 'RbdEncryptionOptionsLUKSBase', |
| 4166 | 'data': { '*cipher-alg': 'QCryptoCipherAlgorithm' } } |
| 4167 | |
| 4168 | ## |
| 4169 | # @RbdEncryptionOptionsLUKS: |
| 4170 | # |
| 4171 | # Since: 6.1 |
| 4172 | ## |
| 4173 | { 'struct': 'RbdEncryptionOptionsLUKS', |
| 4174 | 'base': 'RbdEncryptionOptionsLUKSBase', |
| 4175 | 'data': { } } |
| 4176 | |
| 4177 | ## |
| 4178 | # @RbdEncryptionOptionsLUKS2: |
| 4179 | # |
| 4180 | # Since: 6.1 |
| 4181 | ## |
| 4182 | { 'struct': 'RbdEncryptionOptionsLUKS2', |
| 4183 | 'base': 'RbdEncryptionOptionsLUKSBase', |
| 4184 | 'data': { } } |
| 4185 | |
| 4186 | ## |
Or Ozeri | b8f218e | 2023-01-29 05:31:19 -0600 | [diff] [blame] | 4187 | # @RbdEncryptionOptionsLUKSAny: |
| 4188 | # |
| 4189 | # Since: 8.0 |
| 4190 | ## |
| 4191 | { 'struct': 'RbdEncryptionOptionsLUKSAny', |
| 4192 | 'base': 'RbdEncryptionOptionsLUKSBase', |
| 4193 | 'data': { } } |
| 4194 | |
| 4195 | ## |
Or Ozeri | 42e4ac9 | 2021-06-27 14:46:35 +0300 | [diff] [blame] | 4196 | # @RbdEncryptionCreateOptionsLUKS: |
| 4197 | # |
| 4198 | # Since: 6.1 |
| 4199 | ## |
| 4200 | { 'struct': 'RbdEncryptionCreateOptionsLUKS', |
| 4201 | 'base': 'RbdEncryptionCreateOptionsLUKSBase', |
| 4202 | 'data': { } } |
| 4203 | |
| 4204 | ## |
| 4205 | # @RbdEncryptionCreateOptionsLUKS2: |
| 4206 | # |
| 4207 | # Since: 6.1 |
| 4208 | ## |
| 4209 | { 'struct': 'RbdEncryptionCreateOptionsLUKS2', |
| 4210 | 'base': 'RbdEncryptionCreateOptionsLUKSBase', |
| 4211 | 'data': { } } |
| 4212 | |
| 4213 | ## |
| 4214 | # @RbdEncryptionOptions: |
| 4215 | # |
Or Ozeri | 0f385a2 | 2023-01-29 05:31:20 -0600 | [diff] [blame] | 4216 | # @format: Encryption format. |
| 4217 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4218 | # @parent: Parent image encryption options (for cloned images). Can |
| 4219 | # be left unspecified if this cloned image is encrypted using the |
| 4220 | # same format and secret as its parent image (i.e. not explicitly |
| 4221 | # formatted) or if its parent image is not encrypted. (Since 8.0) |
Or Ozeri | 0f385a2 | 2023-01-29 05:31:20 -0600 | [diff] [blame] | 4222 | # |
Or Ozeri | 42e4ac9 | 2021-06-27 14:46:35 +0300 | [diff] [blame] | 4223 | # Since: 6.1 |
| 4224 | ## |
| 4225 | { 'union': 'RbdEncryptionOptions', |
Or Ozeri | 0f385a2 | 2023-01-29 05:31:20 -0600 | [diff] [blame] | 4226 | 'base': { 'format': 'RbdImageEncryptionFormat', |
| 4227 | '*parent': 'RbdEncryptionOptions' }, |
Or Ozeri | 42e4ac9 | 2021-06-27 14:46:35 +0300 | [diff] [blame] | 4228 | 'discriminator': 'format', |
| 4229 | 'data': { 'luks': 'RbdEncryptionOptionsLUKS', |
Or Ozeri | b8f218e | 2023-01-29 05:31:19 -0600 | [diff] [blame] | 4230 | 'luks2': 'RbdEncryptionOptionsLUKS2', |
| 4231 | 'luks-any': 'RbdEncryptionOptionsLUKSAny'} } |
Or Ozeri | 42e4ac9 | 2021-06-27 14:46:35 +0300 | [diff] [blame] | 4232 | |
| 4233 | ## |
| 4234 | # @RbdEncryptionCreateOptions: |
| 4235 | # |
Markus Armbruster | 89a2273 | 2024-02-05 08:47:09 +0100 | [diff] [blame] | 4236 | # @format: Encryption format. |
| 4237 | # |
Or Ozeri | 42e4ac9 | 2021-06-27 14:46:35 +0300 | [diff] [blame] | 4238 | # Since: 6.1 |
| 4239 | ## |
| 4240 | { 'union': 'RbdEncryptionCreateOptions', |
| 4241 | 'base': { 'format': 'RbdImageEncryptionFormat' }, |
| 4242 | 'discriminator': 'format', |
| 4243 | 'data': { 'luks': 'RbdEncryptionCreateOptionsLUKS', |
| 4244 | 'luks2': 'RbdEncryptionCreateOptionsLUKS2' } } |
| 4245 | |
| 4246 | ## |
Jeff Cody | 8a47e8e | 2017-02-27 01:16:41 -0500 | [diff] [blame] | 4247 | # @BlockdevOptionsRbd: |
| 4248 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4249 | # @pool: Ceph pool name. |
Jeff Cody | 8a47e8e | 2017-02-27 01:16:41 -0500 | [diff] [blame] | 4250 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4251 | # @namespace: Rados namespace name in the Ceph pool. (Since 5.0) |
Florian Florensa | 19ae9ae | 2020-01-10 12:15:13 +0100 | [diff] [blame] | 4252 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4253 | # @image: Image name in the Ceph pool. |
Jeff Cody | 8a47e8e | 2017-02-27 01:16:41 -0500 | [diff] [blame] | 4254 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4255 | # @conf: path to Ceph configuration file. Values in the configuration |
| 4256 | # file will be overridden by options specified via QAPI. |
Jeff Cody | 8a47e8e | 2017-02-27 01:16:41 -0500 | [diff] [blame] | 4257 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4258 | # @snapshot: Ceph snapshot name. |
Jeff Cody | 8a47e8e | 2017-02-27 01:16:41 -0500 | [diff] [blame] | 4259 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4260 | # @encrypt: Image encryption options. (Since 6.1) |
Or Ozeri | 42e4ac9 | 2021-06-27 14:46:35 +0300 | [diff] [blame] | 4261 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4262 | # @user: Ceph id name. |
Jeff Cody | 8a47e8e | 2017-02-27 01:16:41 -0500 | [diff] [blame] | 4263 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4264 | # @auth-client-required: Acceptable authentication modes. This maps |
| 4265 | # to Ceph configuration option "auth_client_required". (Since |
| 4266 | # 3.0) |
Markus Armbruster | a3699de | 2018-06-14 21:14:42 +0200 | [diff] [blame] | 4267 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4268 | # @key-secret: ID of a QCryptoSecret object providing a key for cephx |
| 4269 | # authentication. This maps to Ceph configuration option "key". |
| 4270 | # (Since 3.0) |
Markus Armbruster | d083f95 | 2018-06-14 21:14:43 +0200 | [diff] [blame] | 4271 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4272 | # @server: Monitor host address and port. This maps to the "mon_host" |
| 4273 | # Ceph option. |
Jeff Cody | 0a55679 | 2017-02-27 12:36:46 -0500 | [diff] [blame] | 4274 | # |
Jeff Cody | 8a47e8e | 2017-02-27 01:16:41 -0500 | [diff] [blame] | 4275 | # Since: 2.9 |
| 4276 | ## |
| 4277 | { 'struct': 'BlockdevOptionsRbd', |
| 4278 | 'data': { 'pool': 'str', |
Florian Florensa | 19ae9ae | 2020-01-10 12:15:13 +0100 | [diff] [blame] | 4279 | '*namespace': 'str', |
Jeff Cody | 8a47e8e | 2017-02-27 01:16:41 -0500 | [diff] [blame] | 4280 | 'image': 'str', |
| 4281 | '*conf': 'str', |
| 4282 | '*snapshot': 'str', |
Or Ozeri | 42e4ac9 | 2021-06-27 14:46:35 +0300 | [diff] [blame] | 4283 | '*encrypt': 'RbdEncryptionOptions', |
Jeff Cody | 8a47e8e | 2017-02-27 01:16:41 -0500 | [diff] [blame] | 4284 | '*user': 'str', |
Markus Armbruster | a3699de | 2018-06-14 21:14:42 +0200 | [diff] [blame] | 4285 | '*auth-client-required': ['RbdAuthMode'], |
Markus Armbruster | d083f95 | 2018-06-14 21:14:43 +0200 | [diff] [blame] | 4286 | '*key-secret': 'str', |
Markus Armbruster | 577d8c9 | 2017-03-28 10:56:07 +0200 | [diff] [blame] | 4287 | '*server': ['InetSocketAddressBase'] } } |
Jeff Cody | 8a47e8e | 2017-02-27 01:16:41 -0500 | [diff] [blame] | 4288 | |
Kevin Wolf | 31eb120 | 2016-12-08 14:23:11 +0100 | [diff] [blame] | 4289 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 4290 | # @ReplicationMode: |
Changlong Xie | 190b9a8 | 2016-07-27 15:01:49 +0800 | [diff] [blame] | 4291 | # |
| 4292 | # An enumeration of replication modes. |
| 4293 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4294 | # @primary: Primary mode, the vm's state will be sent to secondary |
| 4295 | # QEMU. |
Changlong Xie | 190b9a8 | 2016-07-27 15:01:49 +0800 | [diff] [blame] | 4296 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4297 | # @secondary: Secondary mode, receive the vm's state from primary |
| 4298 | # QEMU. |
Changlong Xie | 190b9a8 | 2016-07-27 15:01:49 +0800 | [diff] [blame] | 4299 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 4300 | # Since: 2.9 |
Changlong Xie | 190b9a8 | 2016-07-27 15:01:49 +0800 | [diff] [blame] | 4301 | ## |
Marc-André Lureau | 335d10c | 2018-12-13 16:37:24 +0400 | [diff] [blame] | 4302 | { 'enum' : 'ReplicationMode', 'data' : [ 'primary', 'secondary' ], |
Marc-André Lureau | 8a9f1e1 | 2021-08-04 12:31:05 +0400 | [diff] [blame] | 4303 | 'if': 'CONFIG_REPLICATION' } |
Changlong Xie | 190b9a8 | 2016-07-27 15:01:49 +0800 | [diff] [blame] | 4304 | |
| 4305 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 4306 | # @BlockdevOptionsReplication: |
Wen Congyang | 82ac554 | 2016-07-27 15:01:52 +0800 | [diff] [blame] | 4307 | # |
| 4308 | # Driver specific block device options for replication |
| 4309 | # |
| 4310 | # @mode: the replication mode |
| 4311 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4312 | # @top-id: In secondary mode, node name or device ID of the root node |
| 4313 | # who owns the replication node chain. Must not be given in |
| 4314 | # primary mode. |
Wen Congyang | 82ac554 | 2016-07-27 15:01:52 +0800 | [diff] [blame] | 4315 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 4316 | # Since: 2.9 |
Wen Congyang | 82ac554 | 2016-07-27 15:01:52 +0800 | [diff] [blame] | 4317 | ## |
| 4318 | { 'struct': 'BlockdevOptionsReplication', |
| 4319 | 'base': 'BlockdevOptionsGenericFormat', |
| 4320 | 'data': { 'mode': 'ReplicationMode', |
Marc-André Lureau | 335d10c | 2018-12-13 16:37:24 +0400 | [diff] [blame] | 4321 | '*top-id': 'str' }, |
Marc-André Lureau | 8a9f1e1 | 2021-08-04 12:31:05 +0400 | [diff] [blame] | 4322 | 'if': 'CONFIG_REPLICATION' } |
Wen Congyang | 82ac554 | 2016-07-27 15:01:52 +0800 | [diff] [blame] | 4323 | |
| 4324 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 4325 | # @NFSTransport: |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4326 | # |
| 4327 | # An enumeration of NFS transport types |
| 4328 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4329 | # @inet: TCP transport |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4330 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 4331 | # Since: 2.9 |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4332 | ## |
| 4333 | { 'enum': 'NFSTransport', |
| 4334 | 'data': [ 'inet' ] } |
| 4335 | |
| 4336 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 4337 | # @NFSServer: |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4338 | # |
| 4339 | # Captures the address of the socket |
| 4340 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4341 | # @type: transport type used for NFS (only TCP supported) |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4342 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4343 | # @host: host address for NFS server |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4344 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 4345 | # Since: 2.9 |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4346 | ## |
| 4347 | { 'struct': 'NFSServer', |
| 4348 | 'data': { 'type': 'NFSTransport', |
| 4349 | 'host': 'str' } } |
| 4350 | |
| 4351 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 4352 | # @BlockdevOptionsNfs: |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4353 | # |
| 4354 | # Driver specific block device option for NFS |
| 4355 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4356 | # @server: host address |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4357 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4358 | # @path: path of the image on the host |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4359 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4360 | # @user: UID value to use when talking to the server (defaults to |
| 4361 | # 65534 on Windows and getuid() on unix) |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4362 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4363 | # @group: GID value to use when talking to the server (defaults to |
| 4364 | # 65534 on Windows and getgid() in unix) |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4365 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4366 | # @tcp-syn-count: number of SYNs during the session establishment |
| 4367 | # (defaults to libnfs default) |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4368 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4369 | # @readahead-size: set the readahead size in bytes (defaults to libnfs |
| 4370 | # default) |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4371 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4372 | # @page-cache-size: set the pagecache size in bytes (defaults to |
| 4373 | # libnfs default) |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4374 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4375 | # @debug: set the NFS debug level (max 2) (defaults to libnfs default) |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4376 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 4377 | # Since: 2.9 |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4378 | ## |
| 4379 | { 'struct': 'BlockdevOptionsNfs', |
| 4380 | 'data': { 'server': 'NFSServer', |
| 4381 | 'path': 'str', |
| 4382 | '*user': 'int', |
| 4383 | '*group': 'int', |
| 4384 | '*tcp-syn-count': 'int', |
| 4385 | '*readahead-size': 'int', |
| 4386 | '*page-cache-size': 'int', |
Prasanna Kumar Kalever | 7103d91 | 2016-11-02 22:20:37 +0530 | [diff] [blame] | 4387 | '*debug': 'int' } } |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4388 | |
| 4389 | ## |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4390 | # @BlockdevOptionsCurlBase: |
Kevin Wolf | 6855528 | 2016-09-08 13:08:20 +0200 | [diff] [blame] | 4391 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4392 | # Driver specific block device options shared by all protocols |
| 4393 | # supported by the curl backend. |
Kevin Wolf | 6855528 | 2016-09-08 13:08:20 +0200 | [diff] [blame] | 4394 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4395 | # @url: URL of the image file |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4396 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4397 | # @readahead: Size of the read-ahead cache; must be a multiple of 512 |
| 4398 | # (defaults to 256 kB) |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4399 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4400 | # @timeout: Timeout for connections, in seconds (defaults to 5) |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4401 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4402 | # @username: Username for authentication (defaults to none) |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4403 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4404 | # @password-secret: ID of a QCryptoSecret object providing a password |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4405 | # for authentication (defaults to no password) |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4406 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4407 | # @proxy-username: Username for proxy authentication (defaults to |
| 4408 | # none) |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4409 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4410 | # @proxy-password-secret: ID of a QCryptoSecret object providing a |
| 4411 | # password for proxy authentication (defaults to no password) |
Kevin Wolf | 6855528 | 2016-09-08 13:08:20 +0200 | [diff] [blame] | 4412 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 4413 | # Since: 2.9 |
Kevin Wolf | 6855528 | 2016-09-08 13:08:20 +0200 | [diff] [blame] | 4414 | ## |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4415 | { 'struct': 'BlockdevOptionsCurlBase', |
| 4416 | 'data': { 'url': 'str', |
| 4417 | '*readahead': 'int', |
| 4418 | '*timeout': 'int', |
| 4419 | '*username': 'str', |
| 4420 | '*password-secret': 'str', |
| 4421 | '*proxy-username': 'str', |
| 4422 | '*proxy-password-secret': 'str' } } |
| 4423 | |
| 4424 | ## |
| 4425 | # @BlockdevOptionsCurlHttp: |
| 4426 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4427 | # Driver specific block device options for HTTP connections over the |
| 4428 | # curl backend. URLs must start with "http://". |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4429 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4430 | # @cookie: List of cookies to set; format is "name1=content1; |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 4431 | # name2=content2;" as explained by CURLOPT_COOKIE(3). Defaults to |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4432 | # no cookies. |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4433 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4434 | # @cookie-secret: ID of a QCryptoSecret object providing the cookie |
| 4435 | # data in a secure way. See @cookie for the format. (since 2.10) |
Peter Krempa | 327c8eb | 2017-05-04 16:00:06 +0200 | [diff] [blame] | 4436 | # |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4437 | # Since: 2.9 |
| 4438 | ## |
| 4439 | { 'struct': 'BlockdevOptionsCurlHttp', |
| 4440 | 'base': 'BlockdevOptionsCurlBase', |
Peter Krempa | 327c8eb | 2017-05-04 16:00:06 +0200 | [diff] [blame] | 4441 | 'data': { '*cookie': 'str', |
| 4442 | '*cookie-secret': 'str'} } |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4443 | |
| 4444 | ## |
| 4445 | # @BlockdevOptionsCurlHttps: |
| 4446 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4447 | # Driver specific block device options for HTTPS connections over the |
| 4448 | # curl backend. URLs must start with "https://". |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4449 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4450 | # @cookie: List of cookies to set; format is "name1=content1; |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 4451 | # name2=content2;" as explained by CURLOPT_COOKIE(3). Defaults to |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4452 | # no cookies. |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4453 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4454 | # @sslverify: Whether to verify the SSL certificate's validity |
| 4455 | # (defaults to true) |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4456 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4457 | # @cookie-secret: ID of a QCryptoSecret object providing the cookie |
| 4458 | # data in a secure way. See @cookie for the format. (since 2.10) |
Peter Krempa | 327c8eb | 2017-05-04 16:00:06 +0200 | [diff] [blame] | 4459 | # |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4460 | # Since: 2.9 |
| 4461 | ## |
| 4462 | { 'struct': 'BlockdevOptionsCurlHttps', |
| 4463 | 'base': 'BlockdevOptionsCurlBase', |
| 4464 | 'data': { '*cookie': 'str', |
Peter Krempa | 327c8eb | 2017-05-04 16:00:06 +0200 | [diff] [blame] | 4465 | '*sslverify': 'bool', |
| 4466 | '*cookie-secret': 'str'} } |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4467 | |
| 4468 | ## |
| 4469 | # @BlockdevOptionsCurlFtp: |
| 4470 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4471 | # Driver specific block device options for FTP connections over the |
| 4472 | # curl backend. URLs must start with "ftp://". |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4473 | # |
| 4474 | # Since: 2.9 |
| 4475 | ## |
| 4476 | { 'struct': 'BlockdevOptionsCurlFtp', |
| 4477 | 'base': 'BlockdevOptionsCurlBase', |
| 4478 | 'data': { } } |
| 4479 | |
| 4480 | ## |
| 4481 | # @BlockdevOptionsCurlFtps: |
| 4482 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4483 | # Driver specific block device options for FTPS connections over the |
| 4484 | # curl backend. URLs must start with "ftps://". |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4485 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4486 | # @sslverify: Whether to verify the SSL certificate's validity |
| 4487 | # (defaults to true) |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4488 | # |
| 4489 | # Since: 2.9 |
| 4490 | ## |
| 4491 | { 'struct': 'BlockdevOptionsCurlFtps', |
| 4492 | 'base': 'BlockdevOptionsCurlBase', |
| 4493 | 'data': { '*sslverify': 'bool' } } |
Kevin Wolf | 6855528 | 2016-09-08 13:08:20 +0200 | [diff] [blame] | 4494 | |
| 4495 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 4496 | # @BlockdevOptionsNbd: |
Max Reitz | 6b02b1f | 2016-10-25 15:11:36 +0200 | [diff] [blame] | 4497 | # |
| 4498 | # Driver specific block device options for NBD. |
| 4499 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4500 | # @server: NBD server address |
Max Reitz | 6b02b1f | 2016-10-25 15:11:36 +0200 | [diff] [blame] | 4501 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4502 | # @export: export name |
Max Reitz | 6b02b1f | 2016-10-25 15:11:36 +0200 | [diff] [blame] | 4503 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4504 | # @tls-creds: TLS credentials ID |
Max Reitz | 6b02b1f | 2016-10-25 15:11:36 +0200 | [diff] [blame] | 4505 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4506 | # @tls-hostname: TLS hostname override for certificate validation |
| 4507 | # (Since 7.0) |
Daniel P. Berrangé | a0cd6d2 | 2022-03-04 19:36:01 +0000 | [diff] [blame] | 4508 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4509 | # @x-dirty-bitmap: A metadata context name such as |
| 4510 | # "qemu:dirty-bitmap:NAME" or "qemu:allocation-depth" to query in |
| 4511 | # place of the traditional "base:allocation" block status (see |
| 4512 | # NBD_OPT_LIST_META_CONTEXT in the NBD protocol; and yes, naming |
| 4513 | # this option x-context would have made more sense) (since 3.0) |
Eric Blake | 216ee36 | 2018-07-02 14:14:57 -0500 | [diff] [blame] | 4514 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4515 | # @reconnect-delay: On an unexpected disconnect, the nbd client tries |
| 4516 | # to connect again until succeeding or encountering a serious |
| 4517 | # error. During the first @reconnect-delay seconds, all requests |
| 4518 | # are paused and will be rerun on a successful reconnect. After |
| 4519 | # that time, any delayed requests and all future requests before a |
| 4520 | # successful reconnect will immediately fail. Default 0 (Since |
| 4521 | # 4.2) |
Vladimir Sementsov-Ogievskiy | b172ae2 | 2019-06-18 14:43:23 +0300 | [diff] [blame] | 4522 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4523 | # @open-timeout: In seconds. If zero, the nbd driver tries the |
| 4524 | # connection only once, and fails to open if the connection fails. |
| 4525 | # If non-zero, the nbd driver will repeat connection attempts |
| 4526 | # until successful or until @open-timeout seconds have elapsed. |
| 4527 | # Default 0 (Since 7.0) |
Vladimir Sementsov-Ogievskiy | be16b8b | 2021-09-06 22:06:48 +0300 | [diff] [blame] | 4528 | # |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 4529 | # Features: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4530 | # |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 4531 | # @unstable: Member @x-dirty-bitmap is experimental. |
| 4532 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 4533 | # Since: 2.9 |
Max Reitz | 6b02b1f | 2016-10-25 15:11:36 +0200 | [diff] [blame] | 4534 | ## |
| 4535 | { 'struct': 'BlockdevOptionsNbd', |
Markus Armbruster | 62cf396 | 2017-04-26 09:36:40 +0200 | [diff] [blame] | 4536 | 'data': { 'server': 'SocketAddress', |
Max Reitz | 6b02b1f | 2016-10-25 15:11:36 +0200 | [diff] [blame] | 4537 | '*export': 'str', |
Eric Blake | 216ee36 | 2018-07-02 14:14:57 -0500 | [diff] [blame] | 4538 | '*tls-creds': 'str', |
Daniel P. Berrangé | a0cd6d2 | 2022-03-04 19:36:01 +0000 | [diff] [blame] | 4539 | '*tls-hostname': 'str', |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 4540 | '*x-dirty-bitmap': { 'type': 'str', 'features': [ 'unstable' ] }, |
Vladimir Sementsov-Ogievskiy | be16b8b | 2021-09-06 22:06:48 +0300 | [diff] [blame] | 4541 | '*reconnect-delay': 'uint32', |
| 4542 | '*open-timeout': 'uint32' } } |
Max Reitz | 6b02b1f | 2016-10-25 15:11:36 +0200 | [diff] [blame] | 4543 | |
| 4544 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 4545 | # @BlockdevOptionsRaw: |
Tomáš Golembiovský | 2fdc704 | 2016-10-31 11:27:40 +0100 | [diff] [blame] | 4546 | # |
| 4547 | # Driver specific block device options for the raw driver. |
| 4548 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4549 | # @offset: position where the block device starts |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4550 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4551 | # @size: the assumed size of the device |
Tomáš Golembiovský | 2fdc704 | 2016-10-31 11:27:40 +0100 | [diff] [blame] | 4552 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 4553 | # Since: 2.9 |
Tomáš Golembiovský | 2fdc704 | 2016-10-31 11:27:40 +0100 | [diff] [blame] | 4554 | ## |
| 4555 | { 'struct': 'BlockdevOptionsRaw', |
| 4556 | 'base': 'BlockdevOptionsGenericFormat', |
| 4557 | 'data': { '*offset': 'int', '*size': 'int' } } |
| 4558 | |
| 4559 | ## |
Manos Pitsidianakis | d8e7d87 | 2017-08-25 16:20:27 +0300 | [diff] [blame] | 4560 | # @BlockdevOptionsThrottle: |
| 4561 | # |
| 4562 | # Driver specific block device options for the throttle driver |
| 4563 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4564 | # @throttle-group: the name of the throttle-group object to use. It |
| 4565 | # must already exist. |
| 4566 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4567 | # @file: reference to or definition of the data source block device |
Andrea Bolognani | 4ae65a5 | 2022-05-03 09:37:32 +0200 | [diff] [blame] | 4568 | # |
Manos Pitsidianakis | d8e7d87 | 2017-08-25 16:20:27 +0300 | [diff] [blame] | 4569 | # Since: 2.11 |
| 4570 | ## |
| 4571 | { 'struct': 'BlockdevOptionsThrottle', |
| 4572 | 'data': { 'throttle-group': 'str', |
| 4573 | 'file' : 'BlockdevRef' |
| 4574 | } } |
Andrey Shinkevich | e4c8fdd | 2020-12-16 09:16:55 +0300 | [diff] [blame] | 4575 | |
| 4576 | ## |
| 4577 | # @BlockdevOptionsCor: |
| 4578 | # |
| 4579 | # Driver specific block device options for the copy-on-read driver. |
| 4580 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4581 | # @bottom: The name of a non-filter node (allocation-bearing layer) |
| 4582 | # that limits the COR operations in the backing chain (inclusive), |
| 4583 | # so that no data below this node will be copied by this filter. |
| 4584 | # If option is absent, the limit is not applied, so that data from |
| 4585 | # all backing layers may be copied. |
Andrey Shinkevich | e4c8fdd | 2020-12-16 09:16:55 +0300 | [diff] [blame] | 4586 | # |
| 4587 | # Since: 6.0 |
| 4588 | ## |
| 4589 | { 'struct': 'BlockdevOptionsCor', |
| 4590 | 'base': 'BlockdevOptionsGenericFormat', |
| 4591 | 'data': { '*bottom': 'str' } } |
| 4592 | |
Manos Pitsidianakis | d8e7d87 | 2017-08-25 16:20:27 +0300 | [diff] [blame] | 4593 | ## |
Vladimir Sementsov-Ogievskiy | f1bb39a | 2022-04-07 16:27:21 +0300 | [diff] [blame] | 4594 | # @OnCbwError: |
| 4595 | # |
| 4596 | # An enumeration of possible behaviors for copy-before-write operation |
| 4597 | # failures. |
| 4598 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4599 | # @break-guest-write: report the error to the guest. This way, the |
| 4600 | # guest will not be able to overwrite areas that cannot be backed |
| 4601 | # up, so the backup process remains valid. |
Vladimir Sementsov-Ogievskiy | f1bb39a | 2022-04-07 16:27:21 +0300 | [diff] [blame] | 4602 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4603 | # @break-snapshot: continue guest write. Doing so will make the |
| 4604 | # provided snapshot state invalid and any backup or export process |
| 4605 | # based on it will finally fail. |
Vladimir Sementsov-Ogievskiy | f1bb39a | 2022-04-07 16:27:21 +0300 | [diff] [blame] | 4606 | # |
| 4607 | # Since: 7.1 |
| 4608 | ## |
| 4609 | { 'enum': 'OnCbwError', |
| 4610 | 'data': [ 'break-guest-write', 'break-snapshot' ] } |
| 4611 | |
| 4612 | ## |
Vladimir Sementsov-Ogievskiy | 783b282 | 2021-08-24 11:38:44 +0300 | [diff] [blame] | 4613 | # @BlockdevOptionsCbw: |
| 4614 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4615 | # Driver specific block device options for the copy-before-write |
| 4616 | # driver, which does so called copy-before-write operations: when data |
| 4617 | # is written to the filter, the filter first reads corresponding |
| 4618 | # blocks from its file child and copies them to @target child. After |
| 4619 | # successfully copying, the write request is propagated to file child. |
| 4620 | # If copying fails, the original write request is failed too and no |
| 4621 | # data is written to file child. |
Vladimir Sementsov-Ogievskiy | 783b282 | 2021-08-24 11:38:44 +0300 | [diff] [blame] | 4622 | # |
| 4623 | # @target: The target for copy-before-write operations. |
| 4624 | # |
Vladimir Sementsov-Ogievskiy | 5f3a3cd | 2022-03-03 20:43:37 +0100 | [diff] [blame] | 4625 | # @bitmap: If specified, copy-before-write filter will do |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4626 | # copy-before-write operations only for dirty regions of the |
| 4627 | # bitmap. Bitmap size must be equal to length of file and target |
| 4628 | # child of the filter. Note also, that bitmap is used only to |
| 4629 | # initialize internal bitmap of the process, so further |
| 4630 | # modifications (or removing) of specified bitmap doesn't |
| 4631 | # influence the filter. (Since 7.0) |
Vladimir Sementsov-Ogievskiy | 5f3a3cd | 2022-03-03 20:43:37 +0100 | [diff] [blame] | 4632 | # |
Vladimir Sementsov-Ogievskiy | f1bb39a | 2022-04-07 16:27:21 +0300 | [diff] [blame] | 4633 | # @on-cbw-error: Behavior on failure of copy-before-write operation. |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4634 | # Default is @break-guest-write. (Since 7.1) |
Vladimir Sementsov-Ogievskiy | f1bb39a | 2022-04-07 16:27:21 +0300 | [diff] [blame] | 4635 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4636 | # @cbw-timeout: Zero means no limit. Non-zero sets the timeout in |
| 4637 | # seconds for copy-before-write operation. When a timeout occurs, |
| 4638 | # the respective copy-before-write operation will fail, and the |
| 4639 | # @on-cbw-error parameter will decide how this failure is handled. |
Markus Armbruster | 5305a4e | 2024-03-22 15:09:09 +0100 | [diff] [blame] | 4640 | # Default 0. (Since 7.1) |
Vladimir Sementsov-Ogievskiy | 6db7fd1 | 2022-04-07 16:27:25 +0300 | [diff] [blame] | 4641 | # |
Vladimir Sementsov-Ogievskiy | 783b282 | 2021-08-24 11:38:44 +0300 | [diff] [blame] | 4642 | # Since: 6.2 |
| 4643 | ## |
| 4644 | { 'struct': 'BlockdevOptionsCbw', |
| 4645 | 'base': 'BlockdevOptionsGenericFormat', |
Vladimir Sementsov-Ogievskiy | f1bb39a | 2022-04-07 16:27:21 +0300 | [diff] [blame] | 4646 | 'data': { 'target': 'BlockdevRef', '*bitmap': 'BlockDirtyBitmap', |
Vladimir Sementsov-Ogievskiy | 6db7fd1 | 2022-04-07 16:27:25 +0300 | [diff] [blame] | 4647 | '*on-cbw-error': 'OnCbwError', '*cbw-timeout': 'uint32' } } |
Vladimir Sementsov-Ogievskiy | 783b282 | 2021-08-24 11:38:44 +0300 | [diff] [blame] | 4648 | |
| 4649 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 4650 | # @BlockdevOptions: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4651 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4652 | # Options for creating a block device. Many options are available for |
| 4653 | # all block devices, independent of the block driver: |
Eric Blake | 3666a97 | 2016-03-17 16:48:40 -0600 | [diff] [blame] | 4654 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4655 | # @driver: block driver name |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4656 | # |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 4657 | # @node-name: the node name of the new node (Since 2.0). This option |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4658 | # is required on the top level of blockdev-add. Valid node names |
| 4659 | # start with an alphabetic character and may contain only |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 4660 | # alphanumeric characters, '-', '.' and '_'. Their maximum length |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4661 | # is 31 characters. |
| 4662 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4663 | # @discard: discard-related options (default: ignore) |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4664 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4665 | # @cache: cache-related options |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4666 | # |
| 4667 | # @read-only: whether the block device should be read-only (default: |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 4668 | # false). Note that some block drivers support only read-only |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4669 | # access, either generally or in certain configurations. In this |
| 4670 | # case, the default value does not work and the option must be |
| 4671 | # specified explicitly. |
| 4672 | # |
| 4673 | # @auto-read-only: if true and @read-only is false, QEMU may |
| 4674 | # automatically decide not to open the image read-write as |
| 4675 | # requested, but fall back to read-only instead (and switch |
| 4676 | # between the modes later), e.g. depending on whether the image |
| 4677 | # file is writable or whether a writing user is attached to the |
| 4678 | # node (default: false, since 3.1) |
| 4679 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 4680 | # @detect-zeroes: detect and optimize zero writes (Since 2.1) |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4681 | # (default: off) |
| 4682 | # |
| 4683 | # @force-share: force share all permission on added nodes. Requires |
| 4684 | # read-only=true. (Since 2.10) |
Eric Blake | 3666a97 | 2016-03-17 16:48:40 -0600 | [diff] [blame] | 4685 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 4686 | # Since: 2.9 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4687 | ## |
| 4688 | { 'union': 'BlockdevOptions', |
Eric Blake | 3666a97 | 2016-03-17 16:48:40 -0600 | [diff] [blame] | 4689 | 'base': { 'driver': 'BlockdevDriver', |
Eric Blake | 3666a97 | 2016-03-17 16:48:40 -0600 | [diff] [blame] | 4690 | '*node-name': 'str', |
| 4691 | '*discard': 'BlockdevDiscardOptions', |
| 4692 | '*cache': 'BlockdevCacheOptions', |
Eric Blake | 3666a97 | 2016-03-17 16:48:40 -0600 | [diff] [blame] | 4693 | '*read-only': 'bool', |
Kevin Wolf | e35bdc1 | 2018-10-05 18:57:40 +0200 | [diff] [blame] | 4694 | '*auto-read-only': 'bool', |
Fam Zheng | 5a9347c | 2017-05-03 00:35:37 +0800 | [diff] [blame] | 4695 | '*force-share': 'bool', |
Eric Blake | 3666a97 | 2016-03-17 16:48:40 -0600 | [diff] [blame] | 4696 | '*detect-zeroes': 'BlockdevDetectZeroesOptions' }, |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4697 | 'discriminator': 'driver', |
| 4698 | 'data': { |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4699 | 'blkdebug': 'BlockdevOptionsBlkdebug', |
Aapo Vienamo | bfcc224 | 2018-07-03 17:48:48 +0300 | [diff] [blame] | 4700 | 'blklogwrites':'BlockdevOptionsBlklogwrites', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4701 | 'blkverify': 'BlockdevOptionsBlkverify', |
Pavel Dovgalyuk | 35e32d9 | 2019-10-16 11:40:39 +0300 | [diff] [blame] | 4702 | 'blkreplay': 'BlockdevOptionsBlkreplay', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4703 | 'bochs': 'BlockdevOptionsGenericFormat', |
| 4704 | 'cloop': 'BlockdevOptionsGenericFormat', |
Andrey Shinkevich | f41388e | 2019-12-02 15:15:04 +0300 | [diff] [blame] | 4705 | 'compress': 'BlockdevOptionsGenericFormat', |
Vladimir Sementsov-Ogievskiy | 783b282 | 2021-08-24 11:38:44 +0300 | [diff] [blame] | 4706 | 'copy-before-write':'BlockdevOptionsCbw', |
Andrey Shinkevich | e4c8fdd | 2020-12-16 09:16:55 +0300 | [diff] [blame] | 4707 | 'copy-on-read':'BlockdevOptionsCor', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4708 | 'dmg': 'BlockdevOptionsGenericFormat', |
Fam Zheng | db866be | 2014-09-11 14:09:58 +0800 | [diff] [blame] | 4709 | 'file': 'BlockdevOptionsFile', |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4710 | 'ftp': 'BlockdevOptionsCurlFtp', |
| 4711 | 'ftps': 'BlockdevOptionsCurlFtps', |
Prasanna Kumar Kalever | 7edac2d | 2016-07-19 22:27:32 +0530 | [diff] [blame] | 4712 | 'gluster': 'BlockdevOptionsGluster', |
Joelle van Dyne | 14176c8 | 2021-03-15 11:03:38 -0700 | [diff] [blame] | 4713 | 'host_cdrom': { 'type': 'BlockdevOptionsFile', |
Marc-André Lureau | 8a9f1e1 | 2021-08-04 12:31:05 +0400 | [diff] [blame] | 4714 | 'if': 'HAVE_HOST_BLOCK_DEVICE' }, |
Joelle van Dyne | 14176c8 | 2021-03-15 11:03:38 -0700 | [diff] [blame] | 4715 | 'host_device': { 'type': 'BlockdevOptionsFile', |
Marc-André Lureau | 8a9f1e1 | 2021-08-04 12:31:05 +0400 | [diff] [blame] | 4716 | 'if': 'HAVE_HOST_BLOCK_DEVICE' }, |
Max Reitz | 6b9d62d | 2017-03-31 14:04:30 +0200 | [diff] [blame] | 4717 | 'http': 'BlockdevOptionsCurlHttp', |
| 4718 | 'https': 'BlockdevOptionsCurlHttps', |
Stefan Hajnoczi | fd66dbd | 2022-10-13 14:58:57 -0400 | [diff] [blame] | 4719 | 'io_uring': { 'type': 'BlockdevOptionsIoUring', |
| 4720 | 'if': 'CONFIG_BLKIO' }, |
Kevin Wolf | 31eb120 | 2016-12-08 14:23:11 +0100 | [diff] [blame] | 4721 | 'iscsi': 'BlockdevOptionsIscsi', |
Daniel P. Berrange | 7836857 | 2016-03-21 14:11:47 +0000 | [diff] [blame] | 4722 | 'luks': 'BlockdevOptionsLUKS', |
Max Reitz | 6b02b1f | 2016-10-25 15:11:36 +0200 | [diff] [blame] | 4723 | 'nbd': 'BlockdevOptionsNbd', |
Ashijeet Acharya | aa2623d | 2016-10-31 20:35:50 +0530 | [diff] [blame] | 4724 | 'nfs': 'BlockdevOptionsNfs', |
Fam Zheng | db866be | 2014-09-11 14:09:58 +0800 | [diff] [blame] | 4725 | 'null-aio': 'BlockdevOptionsNull', |
| 4726 | 'null-co': 'BlockdevOptionsNull', |
Fam Zheng | d87ee3d | 2018-01-16 14:09:01 +0800 | [diff] [blame] | 4727 | 'nvme': 'BlockdevOptionsNVMe', |
Stefan Hajnoczi | fd66dbd | 2022-10-13 14:58:57 -0400 | [diff] [blame] | 4728 | 'nvme-io_uring': { 'type': 'BlockdevOptionsNvmeIoUring', |
| 4729 | 'if': 'CONFIG_BLKIO' }, |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4730 | 'parallels': 'BlockdevOptionsGenericFormat', |
Vladimir Sementsov-Ogievskiy | 33fa222 | 2020-10-21 17:58:46 +0300 | [diff] [blame] | 4731 | 'preallocate':'BlockdevOptionsPreallocate', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4732 | 'qcow2': 'BlockdevOptionsQcow2', |
Daniel P. Berrange | d85f422 | 2017-06-23 17:24:08 +0100 | [diff] [blame] | 4733 | 'qcow': 'BlockdevOptionsQcow', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4734 | 'qed': 'BlockdevOptionsGenericCOWFormat', |
Fam Zheng | db866be | 2014-09-11 14:09:58 +0800 | [diff] [blame] | 4735 | 'quorum': 'BlockdevOptionsQuorum', |
Tomáš Golembiovský | 2fdc704 | 2016-10-31 11:27:40 +0100 | [diff] [blame] | 4736 | 'raw': 'BlockdevOptionsRaw', |
Jeff Cody | 8a47e8e | 2017-02-27 01:16:41 -0500 | [diff] [blame] | 4737 | 'rbd': 'BlockdevOptionsRbd', |
Marc-André Lureau | 335d10c | 2018-12-13 16:37:24 +0400 | [diff] [blame] | 4738 | 'replication': { 'type': 'BlockdevOptionsReplication', |
Marc-André Lureau | 8a9f1e1 | 2021-08-04 12:31:05 +0400 | [diff] [blame] | 4739 | 'if': 'CONFIG_REPLICATION' }, |
Vladimir Sementsov-Ogievskiy | 1c14eaa | 2022-03-03 20:43:44 +0100 | [diff] [blame] | 4740 | 'snapshot-access': 'BlockdevOptionsGenericFormat', |
Ashijeet Acharya | ad0e90a | 2016-10-25 18:34:01 +0530 | [diff] [blame] | 4741 | 'ssh': 'BlockdevOptionsSsh', |
Manos Pitsidianakis | d8e7d87 | 2017-08-25 16:20:27 +0300 | [diff] [blame] | 4742 | 'throttle': 'BlockdevOptionsThrottle', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4743 | 'vdi': 'BlockdevOptionsGenericFormat', |
| 4744 | 'vhdx': 'BlockdevOptionsGenericFormat', |
Alberto Faria | 03d9e4c | 2022-10-28 14:16:35 +0100 | [diff] [blame] | 4745 | 'virtio-blk-vfio-pci': |
| 4746 | { 'type': 'BlockdevOptionsVirtioBlkVfioPci', |
| 4747 | 'if': 'CONFIG_BLKIO' }, |
Stefan Hajnoczi | fd66dbd | 2022-10-13 14:58:57 -0400 | [diff] [blame] | 4748 | 'virtio-blk-vhost-user': |
| 4749 | { 'type': 'BlockdevOptionsVirtioBlkVhostUser', |
| 4750 | 'if': 'CONFIG_BLKIO' }, |
| 4751 | 'virtio-blk-vhost-vdpa': |
| 4752 | { 'type': 'BlockdevOptionsVirtioBlkVhostVdpa', |
| 4753 | 'if': 'CONFIG_BLKIO' }, |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4754 | 'vmdk': 'BlockdevOptionsGenericCOWFormat', |
| 4755 | 'vpc': 'BlockdevOptionsGenericFormat', |
Marc-André Lureau | a084645 | 2020-07-11 10:59:26 +0400 | [diff] [blame] | 4756 | 'vvfat': 'BlockdevOptionsVVFAT' |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4757 | } } |
| 4758 | |
| 4759 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 4760 | # @BlockdevRef: |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4761 | # |
| 4762 | # Reference to a block device. |
| 4763 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4764 | # @definition: defines a new block device inline |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4765 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4766 | # @reference: references the ID of an existing block device |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4767 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 4768 | # Since: 2.9 |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4769 | ## |
Eric Blake | ab916fa | 2015-05-04 09:05:13 -0600 | [diff] [blame] | 4770 | { 'alternate': 'BlockdevRef', |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4771 | 'data': { 'definition': 'BlockdevOptions', |
| 4772 | 'reference': 'str' } } |
| 4773 | |
| 4774 | ## |
Markus Armbruster | c42e874 | 2017-07-18 08:54:00 +0200 | [diff] [blame] | 4775 | # @BlockdevRefOrNull: |
| 4776 | # |
| 4777 | # Reference to a block device. |
| 4778 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4779 | # @definition: defines a new block device inline |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4780 | # |
| 4781 | # @reference: references the ID of an existing block device. An empty |
| 4782 | # string means that no block device should be referenced. |
| 4783 | # Deprecated; use null instead. |
| 4784 | # |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 4785 | # @null: No block device should be referenced (since 2.10) |
Markus Armbruster | c42e874 | 2017-07-18 08:54:00 +0200 | [diff] [blame] | 4786 | # |
| 4787 | # Since: 2.9 |
| 4788 | ## |
| 4789 | { 'alternate': 'BlockdevRefOrNull', |
| 4790 | 'data': { 'definition': 'BlockdevOptions', |
| 4791 | 'reference': 'str', |
| 4792 | 'null': 'null' } } |
| 4793 | |
| 4794 | ## |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4795 | # @blockdev-add: |
| 4796 | # |
Kashyap Chamarthy | e947e9c | 2020-08-05 12:01:58 +0200 | [diff] [blame] | 4797 | # Creates a new block device. |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4798 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 4799 | # Since: 2.9 |
Marc-André Lureau | b474994 | 2016-06-23 14:54:05 +0200 | [diff] [blame] | 4800 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 4801 | # .. qmp-example:: |
Marc-André Lureau | b474994 | 2016-06-23 14:54:05 +0200 | [diff] [blame] | 4802 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 4803 | # -> { "execute": "blockdev-add", |
| 4804 | # "arguments": { |
| 4805 | # "driver": "qcow2", |
| 4806 | # "node-name": "test1", |
Jeff Cody | b166099 | 2017-01-24 20:14:11 -0500 | [diff] [blame] | 4807 | # "file": { |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 4808 | # "driver": "file", |
| 4809 | # "filename": "test.qcow2" |
| 4810 | # } |
| 4811 | # } |
| 4812 | # } |
| 4813 | # <- { "return": {} } |
| 4814 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 4815 | # .. qmp-example:: |
| 4816 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 4817 | # -> { "execute": "blockdev-add", |
| 4818 | # "arguments": { |
| 4819 | # "driver": "qcow2", |
| 4820 | # "node-name": "node0", |
| 4821 | # "discard": "unmap", |
| 4822 | # "cache": { |
| 4823 | # "direct": true |
| 4824 | # }, |
| 4825 | # "file": { |
Jeff Cody | b166099 | 2017-01-24 20:14:11 -0500 | [diff] [blame] | 4826 | # "driver": "file", |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 4827 | # "filename": "/tmp/test.qcow2" |
| 4828 | # }, |
| 4829 | # "backing": { |
| 4830 | # "driver": "raw", |
| 4831 | # "file": { |
| 4832 | # "driver": "file", |
| 4833 | # "filename": "/dev/fdset/4" |
| 4834 | # } |
Marc-André Lureau | b474994 | 2016-06-23 14:54:05 +0200 | [diff] [blame] | 4835 | # } |
| 4836 | # } |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 4837 | # } |
Marc-André Lureau | b474994 | 2016-06-23 14:54:05 +0200 | [diff] [blame] | 4838 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 4839 | # <- { "return": {} } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4840 | ## |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 4841 | { 'command': 'blockdev-add', 'data': 'BlockdevOptions', 'boxed': true, |
| 4842 | 'allow-preconfig': true } |
Benoît Canet | 1ad166b | 2014-06-05 13:45:31 +0200 | [diff] [blame] | 4843 | |
Max Reitz | 7d8a9f7 | 2015-10-26 21:39:08 +0100 | [diff] [blame] | 4844 | ## |
Alberto Garcia | e60edf6 | 2021-07-08 13:47:09 +0200 | [diff] [blame] | 4845 | # @blockdev-reopen: |
Alberto Garcia | 1479c73 | 2019-03-12 18:48:51 +0200 | [diff] [blame] | 4846 | # |
Alberto Garcia | 3908b7a | 2021-07-08 13:47:07 +0200 | [diff] [blame] | 4847 | # Reopens one or more block devices using the given set of options. |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4848 | # Any option not specified will be reset to its default value |
| 4849 | # regardless of its previous status. If an option cannot be changed |
| 4850 | # or a particular driver does not support reopening then the command |
| 4851 | # will return an error. All devices in the list are reopened in one |
| 4852 | # transaction, so if one of them fails then the whole transaction is |
| 4853 | # cancelled. |
Alberto Garcia | 1479c73 | 2019-03-12 18:48:51 +0200 | [diff] [blame] | 4854 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4855 | # The command receives a list of block devices to reopen. For each |
| 4856 | # one of them, the top-level @node-name option (from BlockdevOptions) |
| 4857 | # must be specified and is used to select the block device to be |
| 4858 | # reopened. Other @node-name options must be either omitted or set to |
| 4859 | # the current name of the appropriate node. This command won't change |
| 4860 | # any node name and any attempt to do it will result in an error. |
Alberto Garcia | 1479c73 | 2019-03-12 18:48:51 +0200 | [diff] [blame] | 4861 | # |
| 4862 | # In the case of options that refer to child nodes, the behavior of |
| 4863 | # this command depends on the value: |
| 4864 | # |
| 4865 | # 1) A set of options (BlockdevOptions): the child is reopened with |
| 4866 | # the specified set of options. |
| 4867 | # |
| 4868 | # 2) A reference to the current child: the child is reopened using |
| 4869 | # its existing set of options. |
| 4870 | # |
| 4871 | # 3) A reference to a different node: the current child is replaced |
| 4872 | # with the specified one. |
| 4873 | # |
| 4874 | # 4) NULL: the current child (if any) is detached. |
| 4875 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4876 | # Options (1) and (2) are supported in all cases. Option (3) is |
Alberto Garcia | 3908b7a | 2021-07-08 13:47:07 +0200 | [diff] [blame] | 4877 | # supported for @file and @backing, and option (4) for @backing only. |
Alberto Garcia | 1479c73 | 2019-03-12 18:48:51 +0200 | [diff] [blame] | 4878 | # |
| 4879 | # Unlike with blockdev-add, the @backing option must always be present |
| 4880 | # unless the node being reopened does not have a backing file and its |
| 4881 | # image does not have a default backing file name as part of its |
| 4882 | # metadata. |
| 4883 | # |
Alberto Garcia | e60edf6 | 2021-07-08 13:47:09 +0200 | [diff] [blame] | 4884 | # Since: 6.1 |
Alberto Garcia | 1479c73 | 2019-03-12 18:48:51 +0200 | [diff] [blame] | 4885 | ## |
Alberto Garcia | e60edf6 | 2021-07-08 13:47:09 +0200 | [diff] [blame] | 4886 | { 'command': 'blockdev-reopen', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 4887 | 'data': { 'options': ['BlockdevOptions'] }, |
| 4888 | 'allow-preconfig': true } |
Alberto Garcia | 1479c73 | 2019-03-12 18:48:51 +0200 | [diff] [blame] | 4889 | |
| 4890 | ## |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 4891 | # @blockdev-del: |
Alberto Garcia | 81b936a | 2015-11-02 16:51:55 +0200 | [diff] [blame] | 4892 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4893 | # Deletes a block device that has been added using blockdev-add. The |
| 4894 | # command will fail if the node is attached to a device or is |
Kevin Wolf | 9ec8873 | 2016-09-21 14:56:11 +0200 | [diff] [blame] | 4895 | # otherwise being used. |
Alberto Garcia | 81b936a | 2015-11-02 16:51:55 +0200 | [diff] [blame] | 4896 | # |
Marc-André Lureau | 7a30538 | 2017-01-13 15:41:22 +0100 | [diff] [blame] | 4897 | # @node-name: Name of the graph node to delete. |
| 4898 | # |
Markus Armbruster | 79b7a77 | 2017-03-21 17:53:28 +0100 | [diff] [blame] | 4899 | # Since: 2.9 |
Marc-André Lureau | 915a213 | 2016-06-23 14:55:00 +0200 | [diff] [blame] | 4900 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 4901 | # .. qmp-example:: |
Marc-André Lureau | 915a213 | 2016-06-23 14:55:00 +0200 | [diff] [blame] | 4902 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 4903 | # -> { "execute": "blockdev-add", |
| 4904 | # "arguments": { |
| 4905 | # "driver": "qcow2", |
| 4906 | # "node-name": "node0", |
| 4907 | # "file": { |
| 4908 | # "driver": "file", |
| 4909 | # "filename": "test.qcow2" |
| 4910 | # } |
| 4911 | # } |
| 4912 | # } |
| 4913 | # <- { "return": {} } |
Marc-André Lureau | 915a213 | 2016-06-23 14:55:00 +0200 | [diff] [blame] | 4914 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 4915 | # -> { "execute": "blockdev-del", |
| 4916 | # "arguments": { "node-name": "node0" } |
| 4917 | # } |
| 4918 | # <- { "return": {} } |
Alberto Garcia | 81b936a | 2015-11-02 16:51:55 +0200 | [diff] [blame] | 4919 | ## |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 4920 | { 'command': 'blockdev-del', 'data': { 'node-name': 'str' }, |
| 4921 | 'allow-preconfig': true } |
Alberto Garcia | 81b936a | 2015-11-02 16:51:55 +0200 | [diff] [blame] | 4922 | |
| 4923 | ## |
Kevin Wolf | 927f11e | 2018-01-16 16:04:21 +0100 | [diff] [blame] | 4924 | # @BlockdevCreateOptionsFile: |
| 4925 | # |
| 4926 | # Driver specific image creation options for file. |
| 4927 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 4928 | # @filename: Filename for the new image file |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4929 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 4930 | # @size: Size of the virtual disk in bytes |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4931 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 4932 | # @preallocation: Preallocation mode for the new image (default: off; |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4933 | # allowed values: off, falloc (if CONFIG_POSIX_FALLOCATE), full |
| 4934 | # (if CONFIG_POSIX)) |
| 4935 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 4936 | # @nocow: Turn off copy-on-write (valid only on btrfs; default: off) |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4937 | # |
| 4938 | # @extent-size-hint: Extent size hint to add to the image file; 0 for |
| 4939 | # not adding an extent size hint (default: 1 MB, since 5.1) |
Kevin Wolf | 927f11e | 2018-01-16 16:04:21 +0100 | [diff] [blame] | 4940 | # |
| 4941 | # Since: 2.12 |
| 4942 | ## |
| 4943 | { 'struct': 'BlockdevCreateOptionsFile', |
Kevin Wolf | ffa244c | 2020-07-07 16:23:29 +0200 | [diff] [blame] | 4944 | 'data': { 'filename': 'str', |
| 4945 | 'size': 'size', |
| 4946 | '*preallocation': 'PreallocMode', |
| 4947 | '*nocow': 'bool', |
| 4948 | '*extent-size-hint': 'size'} } |
Kevin Wolf | 927f11e | 2018-01-16 16:04:21 +0100 | [diff] [blame] | 4949 | |
| 4950 | ## |
Kevin Wolf | ab8bda7 | 2018-01-31 16:27:38 +0100 | [diff] [blame] | 4951 | # @BlockdevCreateOptionsGluster: |
| 4952 | # |
| 4953 | # Driver specific image creation options for gluster. |
| 4954 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 4955 | # @location: Where to store the new image file |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4956 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 4957 | # @size: Size of the virtual disk in bytes |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4958 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 4959 | # @preallocation: Preallocation mode for the new image (default: off; |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4960 | # allowed values: off, falloc (if CONFIG_GLUSTERFS_FALLOCATE), |
| 4961 | # full (if CONFIG_GLUSTERFS_ZEROFILL)) |
Kevin Wolf | ab8bda7 | 2018-01-31 16:27:38 +0100 | [diff] [blame] | 4962 | # |
| 4963 | # Since: 2.12 |
| 4964 | ## |
| 4965 | { 'struct': 'BlockdevCreateOptionsGluster', |
| 4966 | 'data': { 'location': 'BlockdevOptionsGluster', |
| 4967 | 'size': 'size', |
| 4968 | '*preallocation': 'PreallocMode' } } |
| 4969 | |
| 4970 | ## |
Kevin Wolf | 1bedcaf | 2018-03-02 14:31:04 +0100 | [diff] [blame] | 4971 | # @BlockdevCreateOptionsLUKS: |
| 4972 | # |
| 4973 | # Driver specific image creation options for LUKS. |
| 4974 | # |
Hyman Huang | 433957b | 2024-01-30 13:37:20 +0800 | [diff] [blame] | 4975 | # @file: Node to create the image format on, mandatory except when |
Markus Armbruster | 5305a4e | 2024-03-22 15:09:09 +0100 | [diff] [blame] | 4976 | # 'preallocation' is not requested |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4977 | # |
Markus Armbruster | 5305a4e | 2024-03-22 15:09:09 +0100 | [diff] [blame] | 4978 | # @header: Block device holding a detached LUKS header. (since 9.0) |
Hyman Huang | d0112eb | 2024-01-30 13:37:22 +0800 | [diff] [blame] | 4979 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 4980 | # @size: Size of the virtual disk in bytes |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 4981 | # |
| 4982 | # @preallocation: Preallocation mode for the new image (since: 4.2) |
| 4983 | # (default: off; allowed values: off, metadata, falloc, full) |
Kevin Wolf | 1bedcaf | 2018-03-02 14:31:04 +0100 | [diff] [blame] | 4984 | # |
| 4985 | # Since: 2.12 |
| 4986 | ## |
| 4987 | { 'struct': 'BlockdevCreateOptionsLUKS', |
| 4988 | 'base': 'QCryptoBlockCreateOptionsLUKS', |
Hyman Huang | 433957b | 2024-01-30 13:37:20 +0800 | [diff] [blame] | 4989 | 'data': { '*file': 'BlockdevRef', |
Hyman Huang | d0112eb | 2024-01-30 13:37:22 +0800 | [diff] [blame] | 4990 | '*header': 'BlockdevRef', |
Maxim Levitsky | 672de72 | 2019-07-16 19:19:01 +0300 | [diff] [blame] | 4991 | 'size': 'size', |
| 4992 | '*preallocation': 'PreallocMode' } } |
Kevin Wolf | 1bedcaf | 2018-03-02 14:31:04 +0100 | [diff] [blame] | 4993 | |
| 4994 | ## |
Kevin Wolf | a1a42af | 2018-01-31 16:27:38 +0100 | [diff] [blame] | 4995 | # @BlockdevCreateOptionsNfs: |
| 4996 | # |
| 4997 | # Driver specific image creation options for NFS. |
| 4998 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 4999 | # @location: Where to store the new image file |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5000 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5001 | # @size: Size of the virtual disk in bytes |
Kevin Wolf | a1a42af | 2018-01-31 16:27:38 +0100 | [diff] [blame] | 5002 | # |
| 5003 | # Since: 2.12 |
| 5004 | ## |
| 5005 | { 'struct': 'BlockdevCreateOptionsNfs', |
| 5006 | 'data': { 'location': 'BlockdevOptionsNfs', |
| 5007 | 'size': 'size' } } |
| 5008 | |
| 5009 | ## |
Kevin Wolf | 1511b49 | 2018-03-06 12:13:58 +0100 | [diff] [blame] | 5010 | # @BlockdevCreateOptionsParallels: |
| 5011 | # |
| 5012 | # Driver specific image creation options for parallels. |
| 5013 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5014 | # @file: Node to create the image format on |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5015 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5016 | # @size: Size of the virtual disk in bytes |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5017 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5018 | # @cluster-size: Cluster size in bytes (default: 1 MB) |
Kevin Wolf | 1511b49 | 2018-03-06 12:13:58 +0100 | [diff] [blame] | 5019 | # |
| 5020 | # Since: 2.12 |
| 5021 | ## |
| 5022 | { 'struct': 'BlockdevCreateOptionsParallels', |
| 5023 | 'data': { 'file': 'BlockdevRef', |
| 5024 | 'size': 'size', |
| 5025 | '*cluster-size': 'size' } } |
| 5026 | |
| 5027 | ## |
Kevin Wolf | 42a3e1a | 2018-03-09 19:53:19 +0100 | [diff] [blame] | 5028 | # @BlockdevCreateOptionsQcow: |
| 5029 | # |
| 5030 | # Driver specific image creation options for qcow. |
| 5031 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5032 | # @file: Node to create the image format on |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5033 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5034 | # @size: Size of the virtual disk in bytes |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5035 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5036 | # @backing-file: File name of the backing file if a backing file |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5037 | # should be used |
| 5038 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5039 | # @encrypt: Encryption options if the image should be encrypted |
Kevin Wolf | 42a3e1a | 2018-03-09 19:53:19 +0100 | [diff] [blame] | 5040 | # |
| 5041 | # Since: 2.12 |
| 5042 | ## |
| 5043 | { 'struct': 'BlockdevCreateOptionsQcow', |
| 5044 | 'data': { 'file': 'BlockdevRef', |
| 5045 | 'size': 'size', |
| 5046 | '*backing-file': 'str', |
| 5047 | '*encrypt': 'QCryptoBlockCreateOptions' } } |
| 5048 | |
| 5049 | ## |
Kevin Wolf | c2808ab | 2017-11-24 16:01:07 +0100 | [diff] [blame] | 5050 | # @BlockdevQcow2Version: |
| 5051 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5052 | # @v2: The original QCOW2 format as introduced in qemu 0.10 (version |
| 5053 | # 2) |
| 5054 | # |
Andrea Bolognani | 23e4645 | 2022-05-03 09:37:35 +0200 | [diff] [blame] | 5055 | # @v3: The extended QCOW2 format as introduced in qemu 1.1 (version 3) |
Kevin Wolf | c2808ab | 2017-11-24 16:01:07 +0100 | [diff] [blame] | 5056 | # |
| 5057 | # Since: 2.12 |
| 5058 | ## |
| 5059 | { 'enum': 'BlockdevQcow2Version', |
| 5060 | 'data': [ 'v2', 'v3' ] } |
| 5061 | |
Kevin Wolf | c2808ab | 2017-11-24 16:01:07 +0100 | [diff] [blame] | 5062 | ## |
Denis Plotnikov | 572ad97 | 2020-05-07 11:25:18 +0300 | [diff] [blame] | 5063 | # @Qcow2CompressionType: |
| 5064 | # |
| 5065 | # Compression type used in qcow2 image file |
| 5066 | # |
| 5067 | # @zlib: zlib compression, see <http://zlib.net/> |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5068 | # |
Denis Plotnikov | d298ac1 | 2020-05-07 11:25:20 +0300 | [diff] [blame] | 5069 | # @zstd: zstd compression, see <http://github.com/facebook/zstd> |
Denis Plotnikov | 572ad97 | 2020-05-07 11:25:18 +0300 | [diff] [blame] | 5070 | # |
| 5071 | # Since: 5.1 |
| 5072 | ## |
| 5073 | { 'enum': 'Qcow2CompressionType', |
Marc-André Lureau | 8a9f1e1 | 2021-08-04 12:31:05 +0400 | [diff] [blame] | 5074 | 'data': [ 'zlib', { 'name': 'zstd', 'if': 'CONFIG_ZSTD' } ] } |
Denis Plotnikov | 572ad97 | 2020-05-07 11:25:18 +0300 | [diff] [blame] | 5075 | |
| 5076 | ## |
Kevin Wolf | c2808ab | 2017-11-24 16:01:07 +0100 | [diff] [blame] | 5077 | # @BlockdevCreateOptionsQcow2: |
| 5078 | # |
| 5079 | # Driver specific image creation options for qcow2. |
| 5080 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5081 | # @file: Node to create the image format on |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5082 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5083 | # @data-file: Node to use as an external data file in which all guest |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5084 | # data is stored so that only metadata remains in the qcow2 file |
| 5085 | # (since: 4.0) |
| 5086 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5087 | # @data-file-raw: True if the external data file must stay valid as a |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5088 | # standalone (read-only) raw image without looking at qcow2 |
| 5089 | # metadata (default: false; since: 4.0) |
| 5090 | # |
Peter Maydell | 826bd06 | 2020-09-25 17:22:56 +0100 | [diff] [blame] | 5091 | # @extended-l2: True to make the image have extended L2 entries |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5092 | # (default: false; since 5.2) |
| 5093 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5094 | # @size: Size of the virtual disk in bytes |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5095 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5096 | # @version: Compatibility level (default: v3) |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5097 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5098 | # @backing-file: File name of the backing file if a backing file |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5099 | # should be used |
| 5100 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5101 | # @backing-fmt: Name of the block driver to use for the backing file |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5102 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5103 | # @encrypt: Encryption options if the image should be encrypted |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5104 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5105 | # @cluster-size: qcow2 cluster size in bytes (default: 65536) |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5106 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5107 | # @preallocation: Preallocation mode for the new image (default: off; |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5108 | # allowed values: off, falloc, full, metadata) |
| 5109 | # |
| 5110 | # @lazy-refcounts: True if refcounts may be updated lazily |
| 5111 | # (default: off) |
| 5112 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5113 | # @refcount-bits: Width of reference counts in bits (default: 16) |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5114 | # |
Denis Plotnikov | 572ad97 | 2020-05-07 11:25:18 +0300 | [diff] [blame] | 5115 | # @compression-type: The image cluster compression method |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5116 | # (default: zlib, since 5.1) |
Kevin Wolf | c2808ab | 2017-11-24 16:01:07 +0100 | [diff] [blame] | 5117 | # |
| 5118 | # Since: 2.12 |
| 5119 | ## |
| 5120 | { 'struct': 'BlockdevCreateOptionsQcow2', |
| 5121 | 'data': { 'file': 'BlockdevRef', |
Kevin Wolf | dcc9868 | 2019-01-14 16:57:27 +0100 | [diff] [blame] | 5122 | '*data-file': 'BlockdevRef', |
Kevin Wolf | 6c3944d | 2019-02-22 14:29:38 +0100 | [diff] [blame] | 5123 | '*data-file-raw': 'bool', |
Alberto Garcia | 7be2025 | 2020-07-10 18:13:13 +0200 | [diff] [blame] | 5124 | '*extended-l2': 'bool', |
Kevin Wolf | c2808ab | 2017-11-24 16:01:07 +0100 | [diff] [blame] | 5125 | 'size': 'size', |
| 5126 | '*version': 'BlockdevQcow2Version', |
| 5127 | '*backing-file': 'str', |
| 5128 | '*backing-fmt': 'BlockdevDriver', |
| 5129 | '*encrypt': 'QCryptoBlockCreateOptions', |
| 5130 | '*cluster-size': 'size', |
| 5131 | '*preallocation': 'PreallocMode', |
| 5132 | '*lazy-refcounts': 'bool', |
Denis Plotnikov | 572ad97 | 2020-05-07 11:25:18 +0300 | [diff] [blame] | 5133 | '*refcount-bits': 'int', |
| 5134 | '*compression-type':'Qcow2CompressionType' } } |
Kevin Wolf | c2808ab | 2017-11-24 16:01:07 +0100 | [diff] [blame] | 5135 | |
| 5136 | ## |
Kevin Wolf | 959355a | 2018-03-09 19:53:19 +0100 | [diff] [blame] | 5137 | # @BlockdevCreateOptionsQed: |
| 5138 | # |
| 5139 | # Driver specific image creation options for qed. |
| 5140 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5141 | # @file: Node to create the image format on |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5142 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5143 | # @size: Size of the virtual disk in bytes |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5144 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5145 | # @backing-file: File name of the backing file if a backing file |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5146 | # should be used |
| 5147 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5148 | # @backing-fmt: Name of the block driver to use for the backing file |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5149 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5150 | # @cluster-size: Cluster size in bytes (default: 65536) |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5151 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5152 | # @table-size: L1/L2 table size (in clusters) |
Kevin Wolf | 959355a | 2018-03-09 19:53:19 +0100 | [diff] [blame] | 5153 | # |
| 5154 | # Since: 2.12 |
| 5155 | ## |
| 5156 | { 'struct': 'BlockdevCreateOptionsQed', |
| 5157 | 'data': { 'file': 'BlockdevRef', |
| 5158 | 'size': 'size', |
| 5159 | '*backing-file': 'str', |
| 5160 | '*backing-fmt': 'BlockdevDriver', |
| 5161 | '*cluster-size': 'size', |
| 5162 | '*table-size': 'int' } } |
| 5163 | |
| 5164 | ## |
Kevin Wolf | 1bebea3 | 2018-01-31 16:27:38 +0100 | [diff] [blame] | 5165 | # @BlockdevCreateOptionsRbd: |
| 5166 | # |
| 5167 | # Driver specific image creation options for rbd/Ceph. |
| 5168 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5169 | # @location: Where to store the new image file. This location cannot |
| 5170 | # point to a snapshot. |
| 5171 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5172 | # @size: Size of the virtual disk in bytes |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5173 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5174 | # @cluster-size: RBD object size |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5175 | # |
| 5176 | # @encrypt: Image encryption options. (Since 6.1) |
Kevin Wolf | 1bebea3 | 2018-01-31 16:27:38 +0100 | [diff] [blame] | 5177 | # |
| 5178 | # Since: 2.12 |
| 5179 | ## |
| 5180 | { 'struct': 'BlockdevCreateOptionsRbd', |
| 5181 | 'data': { 'location': 'BlockdevOptionsRbd', |
| 5182 | 'size': 'size', |
Or Ozeri | 42e4ac9 | 2021-06-27 14:46:35 +0300 | [diff] [blame] | 5183 | '*cluster-size' : 'size', |
| 5184 | '*encrypt' : 'RbdEncryptionCreateOptions' } } |
Kevin Wolf | 1bebea3 | 2018-01-31 16:27:38 +0100 | [diff] [blame] | 5185 | |
| 5186 | ## |
Fam Zheng | 3015372 | 2018-05-15 23:36:32 +0800 | [diff] [blame] | 5187 | # @BlockdevVmdkSubformat: |
| 5188 | # |
| 5189 | # Subformat options for VMDK images |
| 5190 | # |
Andrea Bolognani | c0ac533 | 2022-05-03 09:37:36 +0200 | [diff] [blame] | 5191 | # @monolithicSparse: Single file image with sparse cluster allocation |
Fam Zheng | 3015372 | 2018-05-15 23:36:32 +0800 | [diff] [blame] | 5192 | # |
Andrea Bolognani | c0ac533 | 2022-05-03 09:37:36 +0200 | [diff] [blame] | 5193 | # @monolithicFlat: Single flat data image and a descriptor file |
Fam Zheng | 3015372 | 2018-05-15 23:36:32 +0800 | [diff] [blame] | 5194 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5195 | # @twoGbMaxExtentSparse: Data is split into 2GB (per virtual LBA) |
| 5196 | # sparse extent files, in addition to a descriptor file |
Fam Zheng | 3015372 | 2018-05-15 23:36:32 +0800 | [diff] [blame] | 5197 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5198 | # @twoGbMaxExtentFlat: Data is split into 2GB (per virtual LBA) flat |
| 5199 | # extent files, in addition to a descriptor file |
Fam Zheng | 3015372 | 2018-05-15 23:36:32 +0800 | [diff] [blame] | 5200 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5201 | # @streamOptimized: Single file image sparse cluster allocation, |
| 5202 | # optimized for streaming over network. |
Fam Zheng | 3015372 | 2018-05-15 23:36:32 +0800 | [diff] [blame] | 5203 | # |
| 5204 | # Since: 4.0 |
| 5205 | ## |
| 5206 | { 'enum': 'BlockdevVmdkSubformat', |
| 5207 | 'data': [ 'monolithicSparse', 'monolithicFlat', 'twoGbMaxExtentSparse', |
| 5208 | 'twoGbMaxExtentFlat', 'streamOptimized'] } |
| 5209 | |
| 5210 | ## |
| 5211 | # @BlockdevVmdkAdapterType: |
| 5212 | # |
| 5213 | # Adapter type info for VMDK images |
| 5214 | # |
| 5215 | # Since: 4.0 |
| 5216 | ## |
| 5217 | { 'enum': 'BlockdevVmdkAdapterType', |
| 5218 | 'data': [ 'ide', 'buslogic', 'lsilogic', 'legacyESX'] } |
| 5219 | |
| 5220 | ## |
| 5221 | # @BlockdevCreateOptionsVmdk: |
| 5222 | # |
| 5223 | # Driver specific image creation options for VMDK. |
| 5224 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5225 | # @file: Where to store the new image file. This refers to the image |
| 5226 | # file for monolithcSparse and streamOptimized format, or the |
| 5227 | # descriptor file for other formats. |
| 5228 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5229 | # @size: Size of the virtual disk in bytes |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5230 | # |
| 5231 | # @extents: Where to store the data extents. Required for |
| 5232 | # monolithcFlat, twoGbMaxExtentSparse and twoGbMaxExtentFlat |
| 5233 | # formats. For monolithicFlat, only one entry is required; for |
| 5234 | # twoGbMaxExtent* formats, the number of entries required is |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 5235 | # calculated as extent_number = virtual_size / 2GB. Providing |
| 5236 | # more extents than will be used is an error. |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5237 | # |
| 5238 | # @subformat: The subformat of the VMDK image. Default: |
| 5239 | # "monolithicSparse". |
| 5240 | # |
| 5241 | # @backing-file: The path of backing file. Default: no backing file |
| 5242 | # is used. |
| 5243 | # |
| 5244 | # @adapter-type: The adapter type used to fill in the descriptor. |
| 5245 | # Default: ide. |
| 5246 | # |
| 5247 | # @hwversion: Hardware version. The meaningful options are "4" or |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 5248 | # "6". Default: "4". |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5249 | # |
| 5250 | # @toolsversion: VMware guest tools version. Default: "2147483647" |
| 5251 | # (Since 6.2) |
| 5252 | # |
| 5253 | # @zeroed-grain: Whether to enable zeroed-grain feature for sparse |
| 5254 | # subformats. Default: false. |
Fam Zheng | 3015372 | 2018-05-15 23:36:32 +0800 | [diff] [blame] | 5255 | # |
| 5256 | # Since: 4.0 |
| 5257 | ## |
| 5258 | { 'struct': 'BlockdevCreateOptionsVmdk', |
| 5259 | 'data': { 'file': 'BlockdevRef', |
| 5260 | 'size': 'size', |
| 5261 | '*extents': ['BlockdevRef'], |
| 5262 | '*subformat': 'BlockdevVmdkSubformat', |
| 5263 | '*backing-file': 'str', |
| 5264 | '*adapter-type': 'BlockdevVmdkAdapterType', |
| 5265 | '*hwversion': 'str', |
Thomas Weißschuh | f3d43df | 2021-09-13 15:04:19 +0200 | [diff] [blame] | 5266 | '*toolsversion': 'str', |
Fam Zheng | 3015372 | 2018-05-15 23:36:32 +0800 | [diff] [blame] | 5267 | '*zeroed-grain': 'bool' } } |
| 5268 | |
Fam Zheng | 3015372 | 2018-05-15 23:36:32 +0800 | [diff] [blame] | 5269 | ## |
Kevin Wolf | 4906da7 | 2018-02-05 16:24:32 +0100 | [diff] [blame] | 5270 | # @BlockdevCreateOptionsSsh: |
| 5271 | # |
| 5272 | # Driver specific image creation options for SSH. |
| 5273 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5274 | # @location: Where to store the new image file |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5275 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5276 | # @size: Size of the virtual disk in bytes |
Kevin Wolf | 4906da7 | 2018-02-05 16:24:32 +0100 | [diff] [blame] | 5277 | # |
| 5278 | # Since: 2.12 |
| 5279 | ## |
| 5280 | { 'struct': 'BlockdevCreateOptionsSsh', |
| 5281 | 'data': { 'location': 'BlockdevOptionsSsh', |
| 5282 | 'size': 'size' } } |
| 5283 | |
| 5284 | ## |
Max Reitz | 49858b5 | 2018-03-12 17:55:26 +0100 | [diff] [blame] | 5285 | # @BlockdevCreateOptionsVdi: |
| 5286 | # |
| 5287 | # Driver specific image creation options for VDI. |
| 5288 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5289 | # @file: Node to create the image format on |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5290 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5291 | # @size: Size of the virtual disk in bytes |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5292 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5293 | # @preallocation: Preallocation mode for the new image (default: off; |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5294 | # allowed values: off, metadata) |
Max Reitz | 49858b5 | 2018-03-12 17:55:26 +0100 | [diff] [blame] | 5295 | # |
| 5296 | # Since: 2.12 |
| 5297 | ## |
| 5298 | { 'struct': 'BlockdevCreateOptionsVdi', |
| 5299 | 'data': { 'file': 'BlockdevRef', |
| 5300 | 'size': 'size', |
Kevin Wolf | 61fa648 | 2018-03-20 15:08:00 +0100 | [diff] [blame] | 5301 | '*preallocation': 'PreallocMode' } } |
Max Reitz | 49858b5 | 2018-03-12 17:55:26 +0100 | [diff] [blame] | 5302 | |
| 5303 | ## |
Kevin Wolf | 09b68da | 2018-03-09 19:53:19 +0100 | [diff] [blame] | 5304 | # @BlockdevVhdxSubformat: |
| 5305 | # |
| 5306 | # @dynamic: Growing image file |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5307 | # |
Andrea Bolognani | c0ac533 | 2022-05-03 09:37:36 +0200 | [diff] [blame] | 5308 | # @fixed: Preallocated fixed-size image file |
Kevin Wolf | 09b68da | 2018-03-09 19:53:19 +0100 | [diff] [blame] | 5309 | # |
| 5310 | # Since: 2.12 |
| 5311 | ## |
| 5312 | { 'enum': 'BlockdevVhdxSubformat', |
| 5313 | 'data': [ 'dynamic', 'fixed' ] } |
| 5314 | |
| 5315 | ## |
| 5316 | # @BlockdevCreateOptionsVhdx: |
| 5317 | # |
| 5318 | # Driver specific image creation options for vhdx. |
| 5319 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5320 | # @file: Node to create the image format on |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5321 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5322 | # @size: Size of the virtual disk in bytes |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5323 | # |
| 5324 | # @log-size: Log size in bytes, must be a multiple of 1 MB (default: 1 |
| 5325 | # MB) |
| 5326 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5327 | # @block-size: Block size in bytes, must be a multiple of 1 MB and not |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5328 | # larger than 256 MB (default: automatically choose a block size |
| 5329 | # depending on the image size) |
| 5330 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5331 | # @subformat: vhdx subformat (default: dynamic) |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5332 | # |
Markus Armbruster | 9e27207 | 2023-07-20 09:16:09 +0200 | [diff] [blame] | 5333 | # @block-state-zero: Force use of payload blocks of type 'ZERO'. |
| 5334 | # Non-standard, but default. Do not set to 'off' when using |
| 5335 | # 'qemu-img convert' with subformat=dynamic. |
Kevin Wolf | 09b68da | 2018-03-09 19:53:19 +0100 | [diff] [blame] | 5336 | # |
| 5337 | # Since: 2.12 |
| 5338 | ## |
| 5339 | { 'struct': 'BlockdevCreateOptionsVhdx', |
| 5340 | 'data': { 'file': 'BlockdevRef', |
| 5341 | 'size': 'size', |
| 5342 | '*log-size': 'size', |
| 5343 | '*block-size': 'size', |
| 5344 | '*subformat': 'BlockdevVhdxSubformat', |
| 5345 | '*block-state-zero': 'bool' } } |
| 5346 | |
| 5347 | ## |
Kevin Wolf | 182c883 | 2018-03-09 19:53:19 +0100 | [diff] [blame] | 5348 | # @BlockdevVpcSubformat: |
| 5349 | # |
| 5350 | # @dynamic: Growing image file |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5351 | # |
Andrea Bolognani | c0ac533 | 2022-05-03 09:37:36 +0200 | [diff] [blame] | 5352 | # @fixed: Preallocated fixed-size image file |
Kevin Wolf | 182c883 | 2018-03-09 19:53:19 +0100 | [diff] [blame] | 5353 | # |
| 5354 | # Since: 2.12 |
| 5355 | ## |
| 5356 | { 'enum': 'BlockdevVpcSubformat', |
| 5357 | 'data': [ 'dynamic', 'fixed' ] } |
| 5358 | |
| 5359 | ## |
| 5360 | # @BlockdevCreateOptionsVpc: |
| 5361 | # |
| 5362 | # Driver specific image creation options for vpc (VHD). |
| 5363 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5364 | # @file: Node to create the image format on |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5365 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5366 | # @size: Size of the virtual disk in bytes |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5367 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5368 | # @subformat: vhdx subformat (default: dynamic) |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5369 | # |
| 5370 | # @force-size: Force use of the exact byte size instead of rounding to |
| 5371 | # the next size that can be represented in CHS geometry |
| 5372 | # (default: false) |
Kevin Wolf | 182c883 | 2018-03-09 19:53:19 +0100 | [diff] [blame] | 5373 | # |
| 5374 | # Since: 2.12 |
| 5375 | ## |
| 5376 | { 'struct': 'BlockdevCreateOptionsVpc', |
| 5377 | 'data': { 'file': 'BlockdevRef', |
| 5378 | 'size': 'size', |
| 5379 | '*subformat': 'BlockdevVpcSubformat', |
| 5380 | '*force-size': 'bool' } } |
| 5381 | |
| 5382 | ## |
Kevin Wolf | 5361468 | 2017-11-24 16:01:07 +0100 | [diff] [blame] | 5383 | # @BlockdevCreateOptions: |
| 5384 | # |
| 5385 | # Options for creating an image format on a given node. |
| 5386 | # |
Peter Maydell | f562750 | 2020-02-13 17:56:25 +0000 | [diff] [blame] | 5387 | # @driver: block driver to create the image format |
Kevin Wolf | 5361468 | 2017-11-24 16:01:07 +0100 | [diff] [blame] | 5388 | # |
| 5389 | # Since: 2.12 |
| 5390 | ## |
| 5391 | { 'union': 'BlockdevCreateOptions', |
| 5392 | 'base': { |
| 5393 | 'driver': 'BlockdevDriver' }, |
| 5394 | 'discriminator': 'driver', |
| 5395 | 'data': { |
Kevin Wolf | 927f11e | 2018-01-16 16:04:21 +0100 | [diff] [blame] | 5396 | 'file': 'BlockdevCreateOptionsFile', |
Kevin Wolf | ab8bda7 | 2018-01-31 16:27:38 +0100 | [diff] [blame] | 5397 | 'gluster': 'BlockdevCreateOptionsGluster', |
Kevin Wolf | 1bedcaf | 2018-03-02 14:31:04 +0100 | [diff] [blame] | 5398 | 'luks': 'BlockdevCreateOptionsLUKS', |
Kevin Wolf | a1a42af | 2018-01-31 16:27:38 +0100 | [diff] [blame] | 5399 | 'nfs': 'BlockdevCreateOptionsNfs', |
Kevin Wolf | 1511b49 | 2018-03-06 12:13:58 +0100 | [diff] [blame] | 5400 | 'parallels': 'BlockdevCreateOptionsParallels', |
Kevin Wolf | 42a3e1a | 2018-03-09 19:53:19 +0100 | [diff] [blame] | 5401 | 'qcow': 'BlockdevCreateOptionsQcow', |
Kevin Wolf | c2808ab | 2017-11-24 16:01:07 +0100 | [diff] [blame] | 5402 | 'qcow2': 'BlockdevCreateOptionsQcow2', |
Kevin Wolf | 959355a | 2018-03-09 19:53:19 +0100 | [diff] [blame] | 5403 | 'qed': 'BlockdevCreateOptionsQed', |
Kevin Wolf | 1bebea3 | 2018-01-31 16:27:38 +0100 | [diff] [blame] | 5404 | 'rbd': 'BlockdevCreateOptionsRbd', |
Kevin Wolf | 4906da7 | 2018-02-05 16:24:32 +0100 | [diff] [blame] | 5405 | 'ssh': 'BlockdevCreateOptionsSsh', |
Max Reitz | e381057 | 2018-03-12 17:55:28 +0100 | [diff] [blame] | 5406 | 'vdi': 'BlockdevCreateOptionsVdi', |
Kevin Wolf | 09b68da | 2018-03-09 19:53:19 +0100 | [diff] [blame] | 5407 | 'vhdx': 'BlockdevCreateOptionsVhdx', |
Fam Zheng | 3015372 | 2018-05-15 23:36:32 +0800 | [diff] [blame] | 5408 | 'vmdk': 'BlockdevCreateOptionsVmdk', |
Anton Nefedov | 29cd040 | 2018-06-18 11:40:06 +0300 | [diff] [blame] | 5409 | 'vpc': 'BlockdevCreateOptionsVpc' |
Kevin Wolf | 5361468 | 2017-11-24 16:01:07 +0100 | [diff] [blame] | 5410 | } } |
| 5411 | |
| 5412 | ## |
Kevin Wolf | 3fb588a | 2018-05-25 18:24:51 +0200 | [diff] [blame] | 5413 | # @blockdev-create: |
Kevin Wolf | b0292b8 | 2018-01-09 16:50:57 +0100 | [diff] [blame] | 5414 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5415 | # Starts a job to create an image format on a given node. The job is |
Kevin Wolf | e5ab434 | 2018-01-18 14:33:04 +0100 | [diff] [blame] | 5416 | # automatically finalized, but a manual job-dismiss is required. |
Kevin Wolf | b0292b8 | 2018-01-09 16:50:57 +0100 | [diff] [blame] | 5417 | # |
Andrea Bolognani | c0ac533 | 2022-05-03 09:37:36 +0200 | [diff] [blame] | 5418 | # @job-id: Identifier for the newly created job. |
Kevin Wolf | e5ab434 | 2018-01-18 14:33:04 +0100 | [diff] [blame] | 5419 | # |
Andrea Bolognani | c0ac533 | 2022-05-03 09:37:36 +0200 | [diff] [blame] | 5420 | # @options: Options for the image creation. |
Kevin Wolf | e5ab434 | 2018-01-18 14:33:04 +0100 | [diff] [blame] | 5421 | # |
| 5422 | # Since: 3.0 |
Kevin Wolf | b0292b8 | 2018-01-09 16:50:57 +0100 | [diff] [blame] | 5423 | ## |
Kevin Wolf | 3fb588a | 2018-05-25 18:24:51 +0200 | [diff] [blame] | 5424 | { 'command': 'blockdev-create', |
Kevin Wolf | e5ab434 | 2018-01-18 14:33:04 +0100 | [diff] [blame] | 5425 | 'data': { 'job-id': 'str', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 5426 | 'options': 'BlockdevCreateOptions' }, |
| 5427 | 'allow-preconfig': true } |
Kevin Wolf | b0292b8 | 2018-01-09 16:50:57 +0100 | [diff] [blame] | 5428 | |
| 5429 | ## |
Maxim Levitsky | 30da9dd | 2020-06-25 14:55:46 +0200 | [diff] [blame] | 5430 | # @BlockdevAmendOptionsLUKS: |
| 5431 | # |
| 5432 | # Driver specific image amend options for LUKS. |
| 5433 | # |
| 5434 | # Since: 5.1 |
| 5435 | ## |
| 5436 | { 'struct': 'BlockdevAmendOptionsLUKS', |
| 5437 | 'base': 'QCryptoBlockAmendOptionsLUKS', |
| 5438 | 'data': { } |
| 5439 | } |
| 5440 | |
| 5441 | ## |
Maxim Levitsky | 8ea1613 | 2020-06-25 14:55:47 +0200 | [diff] [blame] | 5442 | # @BlockdevAmendOptionsQcow2: |
| 5443 | # |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 5444 | # Driver specific image amend options for qcow2. For now, only |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5445 | # encryption options can be amended |
Maxim Levitsky | 8ea1613 | 2020-06-25 14:55:47 +0200 | [diff] [blame] | 5446 | # |
Markus Armbruster | 91577c4 | 2023-04-25 08:42:19 +0200 | [diff] [blame] | 5447 | # @encrypt: Encryption options to be amended |
Maxim Levitsky | 8ea1613 | 2020-06-25 14:55:47 +0200 | [diff] [blame] | 5448 | # |
| 5449 | # Since: 5.1 |
| 5450 | ## |
| 5451 | { 'struct': 'BlockdevAmendOptionsQcow2', |
| 5452 | 'data': { '*encrypt': 'QCryptoBlockAmendOptions' } } |
| 5453 | |
| 5454 | ## |
Maxim Levitsky | ced914d | 2020-06-25 14:55:45 +0200 | [diff] [blame] | 5455 | # @BlockdevAmendOptions: |
| 5456 | # |
| 5457 | # Options for amending an image format |
| 5458 | # |
Andrea Bolognani | 23e4645 | 2022-05-03 09:37:35 +0200 | [diff] [blame] | 5459 | # @driver: Block driver of the node to amend. |
Maxim Levitsky | ced914d | 2020-06-25 14:55:45 +0200 | [diff] [blame] | 5460 | # |
| 5461 | # Since: 5.1 |
| 5462 | ## |
| 5463 | { 'union': 'BlockdevAmendOptions', |
| 5464 | 'base': { |
| 5465 | 'driver': 'BlockdevDriver' }, |
| 5466 | 'discriminator': 'driver', |
| 5467 | 'data': { |
Maxim Levitsky | 8ea1613 | 2020-06-25 14:55:47 +0200 | [diff] [blame] | 5468 | 'luks': 'BlockdevAmendOptionsLUKS', |
| 5469 | 'qcow2': 'BlockdevAmendOptionsQcow2' } } |
Maxim Levitsky | ced914d | 2020-06-25 14:55:45 +0200 | [diff] [blame] | 5470 | |
| 5471 | ## |
| 5472 | # @x-blockdev-amend: |
| 5473 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5474 | # Starts a job to amend format specific options of an existing open |
| 5475 | # block device The job is automatically finalized, but a manual |
| 5476 | # job-dismiss is required. |
Maxim Levitsky | ced914d | 2020-06-25 14:55:45 +0200 | [diff] [blame] | 5477 | # |
Andrea Bolognani | c0ac533 | 2022-05-03 09:37:36 +0200 | [diff] [blame] | 5478 | # @job-id: Identifier for the newly created job. |
Maxim Levitsky | ced914d | 2020-06-25 14:55:45 +0200 | [diff] [blame] | 5479 | # |
Andrea Bolognani | c0ac533 | 2022-05-03 09:37:36 +0200 | [diff] [blame] | 5480 | # @node-name: Name of the block node to work on |
Maxim Levitsky | ced914d | 2020-06-25 14:55:45 +0200 | [diff] [blame] | 5481 | # |
Andrea Bolognani | c0ac533 | 2022-05-03 09:37:36 +0200 | [diff] [blame] | 5482 | # @options: Options (driver specific) |
Maxim Levitsky | ced914d | 2020-06-25 14:55:45 +0200 | [diff] [blame] | 5483 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5484 | # @force: Allow unsafe operations, format specific For luks that |
| 5485 | # allows erase of the last active keyslot (permanent loss of |
| 5486 | # data), and replacement of an active keyslot (possible loss of |
| 5487 | # data if IO error happens) |
Maxim Levitsky | ced914d | 2020-06-25 14:55:45 +0200 | [diff] [blame] | 5488 | # |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 5489 | # Features: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5490 | # |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 5491 | # @unstable: This command is experimental. |
| 5492 | # |
Maxim Levitsky | ced914d | 2020-06-25 14:55:45 +0200 | [diff] [blame] | 5493 | # Since: 5.1 |
| 5494 | ## |
| 5495 | { 'command': 'x-blockdev-amend', |
| 5496 | 'data': { 'job-id': 'str', |
| 5497 | 'node-name': 'str', |
| 5498 | 'options': 'BlockdevAmendOptions', |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 5499 | '*force': 'bool' }, |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 5500 | 'features': [ 'unstable' ], |
| 5501 | 'allow-preconfig': true } |
Maxim Levitsky | ced914d | 2020-06-25 14:55:45 +0200 | [diff] [blame] | 5502 | |
| 5503 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 5504 | # @BlockErrorAction: |
Wenchao Xia | a589569 | 2014-06-18 08:43:30 +0200 | [diff] [blame] | 5505 | # |
| 5506 | # An enumeration of action that has been taken when a DISK I/O occurs |
| 5507 | # |
| 5508 | # @ignore: error has been ignored |
| 5509 | # |
| 5510 | # @report: error has been reported to the device |
| 5511 | # |
| 5512 | # @stop: error caused VM to be stopped |
| 5513 | # |
| 5514 | # Since: 2.1 |
| 5515 | ## |
| 5516 | { 'enum': 'BlockErrorAction', |
| 5517 | 'data': [ 'ignore', 'report', 'stop' ] } |
Wenchao Xia | 5a2d2cb | 2014-06-18 08:43:45 +0200 | [diff] [blame] | 5518 | |
Wenchao Xia | 5a2d2cb | 2014-06-18 08:43:45 +0200 | [diff] [blame] | 5519 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 5520 | # @BLOCK_IMAGE_CORRUPTED: |
Wenchao Xia | c120f0f | 2014-06-18 08:43:46 +0200 | [diff] [blame] | 5521 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5522 | # Emitted when a disk image is being marked corrupt. The image can be |
| 5523 | # identified by its device or node name. The 'device' field is always |
Marc-André Lureau | 370d4eb | 2016-06-23 15:51:26 +0200 | [diff] [blame] | 5524 | # present for compatibility reasons, but it can be empty ("") if the |
| 5525 | # image does not have a device name associated. |
Wenchao Xia | c120f0f | 2014-06-18 08:43:46 +0200 | [diff] [blame] | 5526 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5527 | # @device: device name. This is always present for compatibility |
| 5528 | # reasons, but it can be empty ("") if the image does not have a |
| 5529 | # device name associated. |
Alberto Garcia | dc881b4 | 2015-04-08 12:29:20 +0300 | [diff] [blame] | 5530 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 5531 | # @node-name: node name (Since: 2.4) |
Wenchao Xia | c120f0f | 2014-06-18 08:43:46 +0200 | [diff] [blame] | 5532 | # |
| 5533 | # @msg: informative message for human consumption, such as the kind of |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5534 | # corruption being detected. It should not be parsed by machine |
| 5535 | # as it is not guaranteed to be stable |
Wenchao Xia | c120f0f | 2014-06-18 08:43:46 +0200 | [diff] [blame] | 5536 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 5537 | # @offset: if the corruption resulted from an image access, this is |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5538 | # the host's access offset into the image |
Wenchao Xia | c120f0f | 2014-06-18 08:43:46 +0200 | [diff] [blame] | 5539 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5540 | # @size: if the corruption resulted from an image access, this is the |
| 5541 | # access size |
Wenchao Xia | c120f0f | 2014-06-18 08:43:46 +0200 | [diff] [blame] | 5542 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5543 | # @fatal: if set, the image is marked corrupt and therefore unusable |
| 5544 | # after this event and must be repaired (Since 2.2; before, every |
| 5545 | # BLOCK_IMAGE_CORRUPTED event was fatal) |
Max Reitz | 9bf040b | 2014-09-05 16:07:15 +0200 | [diff] [blame] | 5546 | # |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 5547 | # .. note:: If action is "stop", a STOP event will eventually follow |
| 5548 | # the BLOCK_IO_ERROR event. |
Marc-André Lureau | 07c9f58 | 2016-06-23 15:52:10 +0200 | [diff] [blame] | 5549 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 5550 | # .. qmp-example:: |
Marc-André Lureau | 370d4eb | 2016-06-23 15:51:26 +0200 | [diff] [blame] | 5551 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 5552 | # <- { "event": "BLOCK_IMAGE_CORRUPTED", |
| 5553 | # "data": { "device": "", "node-name": "drive", "fatal": false, |
| 5554 | # "msg": "L2 table offset 0x2a2a2a00 unaligned (L1 index: 0)" }, |
| 5555 | # "timestamp": { "seconds": 1648243240, "microseconds": 906060 } } |
Marc-André Lureau | 370d4eb | 2016-06-23 15:51:26 +0200 | [diff] [blame] | 5556 | # |
Wenchao Xia | c120f0f | 2014-06-18 08:43:46 +0200 | [diff] [blame] | 5557 | # Since: 1.7 |
| 5558 | ## |
| 5559 | { 'event': 'BLOCK_IMAGE_CORRUPTED', |
Alberto Garcia | dc881b4 | 2015-04-08 12:29:20 +0300 | [diff] [blame] | 5560 | 'data': { 'device' : 'str', |
| 5561 | '*node-name' : 'str', |
| 5562 | 'msg' : 'str', |
| 5563 | '*offset' : 'int', |
| 5564 | '*size' : 'int', |
| 5565 | 'fatal' : 'bool' } } |
Wenchao Xia | c120f0f | 2014-06-18 08:43:46 +0200 | [diff] [blame] | 5566 | |
| 5567 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 5568 | # @BLOCK_IO_ERROR: |
Wenchao Xia | 5a2d2cb | 2014-06-18 08:43:45 +0200 | [diff] [blame] | 5569 | # |
| 5570 | # Emitted when a disk I/O error occurs |
| 5571 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5572 | # @device: device name. This is always present for compatibility |
| 5573 | # reasons, but it can be empty ("") if the image does not have a |
| 5574 | # device name associated. |
Kevin Wolf | 2bf7e10 | 2016-09-29 16:47:58 +0200 | [diff] [blame] | 5575 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5576 | # @node-name: node name. Note that errors may be reported for the |
| 5577 | # root node that is directly attached to a guest device rather |
| 5578 | # than for the node where the error occurred. The node name is |
| 5579 | # not present if the drive is empty. (Since: 2.8) |
Wenchao Xia | 5a2d2cb | 2014-06-18 08:43:45 +0200 | [diff] [blame] | 5580 | # |
| 5581 | # @operation: I/O operation |
| 5582 | # |
| 5583 | # @action: action that has been taken |
| 5584 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5585 | # @nospace: true if I/O error was caused due to a no-space condition. |
| 5586 | # This key is only present if query-block's io-status is present, |
| 5587 | # please see query-block documentation for more information |
| 5588 | # (since: 2.2) |
Luiz Capitulino | c7c2ff0 | 2014-08-29 16:07:27 -0400 | [diff] [blame] | 5589 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5590 | # @reason: human readable string describing the error cause. (This |
| 5591 | # field is a debugging aid for humans, it should not be parsed by |
| 5592 | # applications) (since: 2.2) |
Luiz Capitulino | 624ff57 | 2014-09-11 10:25:48 -0400 | [diff] [blame] | 5593 | # |
Markus Armbruster | 01bed0f | 2024-07-29 08:52:20 +0200 | [diff] [blame] | 5594 | # .. note:: If action is "stop", a STOP event will eventually follow |
| 5595 | # the BLOCK_IO_ERROR event. |
Wenchao Xia | 5a2d2cb | 2014-06-18 08:43:45 +0200 | [diff] [blame] | 5596 | # |
Markus Armbruster | 9bc6e89 | 2020-11-18 07:41:58 +0100 | [diff] [blame] | 5597 | # Since: 0.13 |
Marc-André Lureau | 07c9f58 | 2016-06-23 15:52:10 +0200 | [diff] [blame] | 5598 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 5599 | # .. qmp-example:: |
Marc-André Lureau | 07c9f58 | 2016-06-23 15:52:10 +0200 | [diff] [blame] | 5600 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 5601 | # <- { "event": "BLOCK_IO_ERROR", |
| 5602 | # "data": { "device": "ide0-hd1", |
| 5603 | # "node-name": "#block212", |
| 5604 | # "operation": "write", |
| 5605 | # "action": "stop", |
| 5606 | # "reason": "No space left on device" }, |
| 5607 | # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } |
Wenchao Xia | 5a2d2cb | 2014-06-18 08:43:45 +0200 | [diff] [blame] | 5608 | ## |
| 5609 | { 'event': 'BLOCK_IO_ERROR', |
Kevin Wolf | bfe1a14 | 2018-03-05 15:59:35 +0100 | [diff] [blame] | 5610 | 'data': { 'device': 'str', '*node-name': 'str', |
| 5611 | 'operation': 'IoOperationType', |
Luiz Capitulino | 624ff57 | 2014-09-11 10:25:48 -0400 | [diff] [blame] | 5612 | 'action': 'BlockErrorAction', '*nospace': 'bool', |
| 5613 | 'reason': 'str' } } |
Wenchao Xia | 5a2d2cb | 2014-06-18 08:43:45 +0200 | [diff] [blame] | 5614 | |
| 5615 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 5616 | # @BLOCK_JOB_COMPLETED: |
Wenchao Xia | bcada37b | 2014-06-18 08:43:47 +0200 | [diff] [blame] | 5617 | # |
| 5618 | # Emitted when a block job has completed |
| 5619 | # |
| 5620 | # @type: job type |
| 5621 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5622 | # @device: The job identifier. Originally the device name but other |
| 5623 | # values are allowed since QEMU 2.7 |
Wenchao Xia | bcada37b | 2014-06-18 08:43:47 +0200 | [diff] [blame] | 5624 | # |
| 5625 | # @len: maximum progress value |
| 5626 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5627 | # @offset: current progress value. On success this is equal to len. |
| 5628 | # On failure this is less than len |
Wenchao Xia | bcada37b | 2014-06-18 08:43:47 +0200 | [diff] [blame] | 5629 | # |
| 5630 | # @speed: rate limit, bytes per second |
| 5631 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5632 | # @error: error message. Only present on failure. This field |
| 5633 | # contains a human-readable error message. There are no semantics |
| 5634 | # other than that streaming has failed and clients should not try |
| 5635 | # to interpret the error string |
Wenchao Xia | bcada37b | 2014-06-18 08:43:47 +0200 | [diff] [blame] | 5636 | # |
| 5637 | # Since: 1.1 |
Marc-André Lureau | e21e65b | 2016-06-23 15:52:56 +0200 | [diff] [blame] | 5638 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 5639 | # .. qmp-example:: |
Marc-André Lureau | e21e65b | 2016-06-23 15:52:56 +0200 | [diff] [blame] | 5640 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 5641 | # <- { "event": "BLOCK_JOB_COMPLETED", |
| 5642 | # "data": { "type": "stream", "device": "virtio-disk0", |
| 5643 | # "len": 10737418240, "offset": 10737418240, |
| 5644 | # "speed": 0 }, |
| 5645 | # "timestamp": { "seconds": 1267061043, "microseconds": 959568 } } |
Wenchao Xia | bcada37b | 2014-06-18 08:43:47 +0200 | [diff] [blame] | 5646 | ## |
| 5647 | { 'event': 'BLOCK_JOB_COMPLETED', |
Kevin Wolf | 8e4c870 | 2018-04-12 18:01:07 +0200 | [diff] [blame] | 5648 | 'data': { 'type' : 'JobType', |
Wenchao Xia | bcada37b | 2014-06-18 08:43:47 +0200 | [diff] [blame] | 5649 | 'device': 'str', |
| 5650 | 'len' : 'int', |
| 5651 | 'offset': 'int', |
| 5652 | 'speed' : 'int', |
| 5653 | '*error': 'str' } } |
| 5654 | |
| 5655 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 5656 | # @BLOCK_JOB_CANCELLED: |
Wenchao Xia | bcada37b | 2014-06-18 08:43:47 +0200 | [diff] [blame] | 5657 | # |
| 5658 | # Emitted when a block job has been cancelled |
| 5659 | # |
| 5660 | # @type: job type |
| 5661 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5662 | # @device: The job identifier. Originally the device name but other |
| 5663 | # values are allowed since QEMU 2.7 |
Wenchao Xia | bcada37b | 2014-06-18 08:43:47 +0200 | [diff] [blame] | 5664 | # |
| 5665 | # @len: maximum progress value |
| 5666 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5667 | # @offset: current progress value. On success this is equal to len. |
| 5668 | # On failure this is less than len |
Wenchao Xia | bcada37b | 2014-06-18 08:43:47 +0200 | [diff] [blame] | 5669 | # |
| 5670 | # @speed: rate limit, bytes per second |
| 5671 | # |
| 5672 | # Since: 1.1 |
Marc-André Lureau | e161df3 | 2016-06-23 15:53:50 +0200 | [diff] [blame] | 5673 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 5674 | # .. qmp-example:: |
Marc-André Lureau | e161df3 | 2016-06-23 15:53:50 +0200 | [diff] [blame] | 5675 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 5676 | # <- { "event": "BLOCK_JOB_CANCELLED", |
| 5677 | # "data": { "type": "stream", "device": "virtio-disk0", |
| 5678 | # "len": 10737418240, "offset": 134217728, |
| 5679 | # "speed": 0 }, |
| 5680 | # "timestamp": { "seconds": 1267061043, "microseconds": 959568 } } |
Wenchao Xia | bcada37b | 2014-06-18 08:43:47 +0200 | [diff] [blame] | 5681 | ## |
| 5682 | { 'event': 'BLOCK_JOB_CANCELLED', |
Kevin Wolf | 8e4c870 | 2018-04-12 18:01:07 +0200 | [diff] [blame] | 5683 | 'data': { 'type' : 'JobType', |
Wenchao Xia | bcada37b | 2014-06-18 08:43:47 +0200 | [diff] [blame] | 5684 | 'device': 'str', |
| 5685 | 'len' : 'int', |
| 5686 | 'offset': 'int', |
| 5687 | 'speed' : 'int' } } |
| 5688 | |
| 5689 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 5690 | # @BLOCK_JOB_ERROR: |
Wenchao Xia | 5a2d2cb | 2014-06-18 08:43:45 +0200 | [diff] [blame] | 5691 | # |
| 5692 | # Emitted when a block job encounters an error |
| 5693 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5694 | # @device: The job identifier. Originally the device name but other |
| 5695 | # values are allowed since QEMU 2.7 |
Wenchao Xia | 5a2d2cb | 2014-06-18 08:43:45 +0200 | [diff] [blame] | 5696 | # |
| 5697 | # @operation: I/O operation |
| 5698 | # |
| 5699 | # @action: action that has been taken |
| 5700 | # |
| 5701 | # Since: 1.3 |
Marc-André Lureau | af0e091 | 2016-06-23 15:54:20 +0200 | [diff] [blame] | 5702 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 5703 | # .. qmp-example:: |
Marc-André Lureau | af0e091 | 2016-06-23 15:54:20 +0200 | [diff] [blame] | 5704 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 5705 | # <- { "event": "BLOCK_JOB_ERROR", |
| 5706 | # "data": { "device": "ide0-hd1", |
| 5707 | # "operation": "write", |
| 5708 | # "action": "stop" }, |
| 5709 | # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } |
Wenchao Xia | 5a2d2cb | 2014-06-18 08:43:45 +0200 | [diff] [blame] | 5710 | ## |
| 5711 | { 'event': 'BLOCK_JOB_ERROR', |
| 5712 | 'data': { 'device' : 'str', |
| 5713 | 'operation': 'IoOperationType', |
Markus Armbruster | 823c686 | 2014-06-27 19:24:14 +0200 | [diff] [blame] | 5714 | 'action' : 'BlockErrorAction' } } |
Wenchao Xia | bcada37b | 2014-06-18 08:43:47 +0200 | [diff] [blame] | 5715 | |
| 5716 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 5717 | # @BLOCK_JOB_READY: |
Wenchao Xia | bcada37b | 2014-06-18 08:43:47 +0200 | [diff] [blame] | 5718 | # |
| 5719 | # Emitted when a block job is ready to complete |
| 5720 | # |
Markus Armbruster | 518848a | 2014-06-27 19:24:13 +0200 | [diff] [blame] | 5721 | # @type: job type |
| 5722 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5723 | # @device: The job identifier. Originally the device name but other |
| 5724 | # values are allowed since QEMU 2.7 |
Wenchao Xia | bcada37b | 2014-06-18 08:43:47 +0200 | [diff] [blame] | 5725 | # |
Markus Armbruster | 518848a | 2014-06-27 19:24:13 +0200 | [diff] [blame] | 5726 | # @len: maximum progress value |
| 5727 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5728 | # @offset: current progress value. On success this is equal to len. |
| 5729 | # On failure this is less than len |
Markus Armbruster | 518848a | 2014-06-27 19:24:13 +0200 | [diff] [blame] | 5730 | # |
| 5731 | # @speed: rate limit, bytes per second |
| 5732 | # |
John Snow | d461c27 | 2024-06-26 18:21:16 -0400 | [diff] [blame] | 5733 | # .. note:: The "ready to complete" status is always reset by a |
| 5734 | # @BLOCK_JOB_ERROR event. |
Wenchao Xia | bcada37b | 2014-06-18 08:43:47 +0200 | [diff] [blame] | 5735 | # |
| 5736 | # Since: 1.3 |
Marc-André Lureau | 11a3dee | 2016-06-23 15:54:49 +0200 | [diff] [blame] | 5737 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 5738 | # .. qmp-example:: |
Marc-André Lureau | 11a3dee | 2016-06-23 15:54:49 +0200 | [diff] [blame] | 5739 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 5740 | # <- { "event": "BLOCK_JOB_READY", |
| 5741 | # "data": { "device": "drive0", "type": "mirror", "speed": 0, |
| 5742 | # "len": 2097152, "offset": 2097152 }, |
| 5743 | # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } |
Wenchao Xia | bcada37b | 2014-06-18 08:43:47 +0200 | [diff] [blame] | 5744 | ## |
| 5745 | { 'event': 'BLOCK_JOB_READY', |
Kevin Wolf | 8e4c870 | 2018-04-12 18:01:07 +0200 | [diff] [blame] | 5746 | 'data': { 'type' : 'JobType', |
Markus Armbruster | 518848a | 2014-06-27 19:24:13 +0200 | [diff] [blame] | 5747 | 'device': 'str', |
| 5748 | 'len' : 'int', |
| 5749 | 'offset': 'int', |
| 5750 | 'speed' : 'int' } } |
Hu Tao | ffeaac9 | 2014-09-10 17:05:47 +0800 | [diff] [blame] | 5751 | |
Marc-André Lureau | 49687ac | 2016-11-17 19:54:51 +0400 | [diff] [blame] | 5752 | ## |
John Snow | 5f24159 | 2018-03-10 03:27:42 -0500 | [diff] [blame] | 5753 | # @BLOCK_JOB_PENDING: |
| 5754 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5755 | # Emitted when a block job is awaiting explicit authorization to |
| 5756 | # finalize graph changes via @block-job-finalize. If this job is part |
| 5757 | # of a transaction, it will not emit this event until the transaction |
| 5758 | # has converged first. |
John Snow | 5f24159 | 2018-03-10 03:27:42 -0500 | [diff] [blame] | 5759 | # |
| 5760 | # @type: job type |
| 5761 | # |
| 5762 | # @id: The job identifier. |
| 5763 | # |
| 5764 | # Since: 2.12 |
| 5765 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 5766 | # .. qmp-example:: |
John Snow | 5f24159 | 2018-03-10 03:27:42 -0500 | [diff] [blame] | 5767 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 5768 | # <- { "event": "BLOCK_JOB_PENDING", |
| 5769 | # "data": { "type": "mirror", "id": "backup_1" }, |
| 5770 | # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } |
John Snow | 5f24159 | 2018-03-10 03:27:42 -0500 | [diff] [blame] | 5771 | ## |
| 5772 | { 'event': 'BLOCK_JOB_PENDING', |
Kevin Wolf | 8e4c870 | 2018-04-12 18:01:07 +0200 | [diff] [blame] | 5773 | 'data': { 'type' : 'JobType', |
John Snow | 5f24159 | 2018-03-10 03:27:42 -0500 | [diff] [blame] | 5774 | 'id' : 'str' } } |
| 5775 | |
| 5776 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 5777 | # @PreallocMode: |
Hu Tao | ffeaac9 | 2014-09-10 17:05:47 +0800 | [diff] [blame] | 5778 | # |
| 5779 | # Preallocation mode of QEMU image file |
| 5780 | # |
| 5781 | # @off: no preallocation |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5782 | # |
Hu Tao | ffeaac9 | 2014-09-10 17:05:47 +0800 | [diff] [blame] | 5783 | # @metadata: preallocate only for metadata |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5784 | # |
Hu Tao | ffeaac9 | 2014-09-10 17:05:47 +0800 | [diff] [blame] | 5785 | # @falloc: like @full preallocation but allocate disk space by |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5786 | # posix_fallocate() rather than writing data. |
| 5787 | # |
Max Reitz | fa27c47 | 2019-07-11 15:29:35 +0200 | [diff] [blame] | 5788 | # @full: preallocate all data by writing it to the device to ensure |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5789 | # disk space is really available. This data may or may not be |
| 5790 | # zero, depending on the image format and storage. @full |
| 5791 | # preallocation also sets up metadata correctly. |
Hu Tao | ffeaac9 | 2014-09-10 17:05:47 +0800 | [diff] [blame] | 5792 | # |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 5793 | # Since: 2.2 |
Hu Tao | ffeaac9 | 2014-09-10 17:05:47 +0800 | [diff] [blame] | 5794 | ## |
| 5795 | { 'enum': 'PreallocMode', |
| 5796 | 'data': [ 'off', 'metadata', 'falloc', 'full' ] } |
Francesco Romani | e246211 | 2015-01-12 14:11:13 +0100 | [diff] [blame] | 5797 | |
| 5798 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 5799 | # @BLOCK_WRITE_THRESHOLD: |
Francesco Romani | e246211 | 2015-01-12 14:11:13 +0100 | [diff] [blame] | 5800 | # |
| 5801 | # Emitted when writes on block device reaches or exceeds the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5802 | # configured write threshold. For thin-provisioned devices, this |
| 5803 | # means the device should be extended to avoid pausing for disk |
| 5804 | # exhaustion. The event is one shot. Once triggered, it needs to be |
Eric Blake | f85d66f | 2017-05-12 14:30:15 -0500 | [diff] [blame] | 5805 | # re-registered with another block-set-write-threshold command. |
Francesco Romani | e246211 | 2015-01-12 14:11:13 +0100 | [diff] [blame] | 5806 | # |
| 5807 | # @node-name: graph node name on which the threshold was exceeded. |
| 5808 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5809 | # @amount-exceeded: amount of data which exceeded the threshold, in |
| 5810 | # bytes. |
Francesco Romani | e246211 | 2015-01-12 14:11:13 +0100 | [diff] [blame] | 5811 | # |
| 5812 | # @write-threshold: last configured threshold, in bytes. |
| 5813 | # |
| 5814 | # Since: 2.3 |
| 5815 | ## |
| 5816 | { 'event': 'BLOCK_WRITE_THRESHOLD', |
| 5817 | 'data': { 'node-name': 'str', |
| 5818 | 'amount-exceeded': 'uint64', |
| 5819 | 'write-threshold': 'uint64' } } |
| 5820 | |
| 5821 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 5822 | # @block-set-write-threshold: |
Francesco Romani | e246211 | 2015-01-12 14:11:13 +0100 | [diff] [blame] | 5823 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5824 | # Change the write threshold for a block drive. An event will be |
Marc-André Lureau | e817862 | 2016-06-23 15:04:41 +0200 | [diff] [blame] | 5825 | # delivered if a write to this block drive crosses the configured |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5826 | # threshold. The threshold is an offset, thus must be non-negative. |
| 5827 | # Default is no write threshold. Setting the threshold to zero |
| 5828 | # disables it. |
Marc-André Lureau | e817862 | 2016-06-23 15:04:41 +0200 | [diff] [blame] | 5829 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5830 | # This is useful to transparently resize thin-provisioned drives |
| 5831 | # without the guest OS noticing. |
Francesco Romani | e246211 | 2015-01-12 14:11:13 +0100 | [diff] [blame] | 5832 | # |
| 5833 | # @node-name: graph node name on which the threshold must be set. |
| 5834 | # |
| 5835 | # @write-threshold: configured threshold for the block device, bytes. |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5836 | # Use 0 to disable the threshold. |
Francesco Romani | e246211 | 2015-01-12 14:11:13 +0100 | [diff] [blame] | 5837 | # |
Francesco Romani | e246211 | 2015-01-12 14:11:13 +0100 | [diff] [blame] | 5838 | # Since: 2.3 |
Marc-André Lureau | e817862 | 2016-06-23 15:04:41 +0200 | [diff] [blame] | 5839 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 5840 | # .. qmp-example:: |
Marc-André Lureau | e817862 | 2016-06-23 15:04:41 +0200 | [diff] [blame] | 5841 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 5842 | # -> { "execute": "block-set-write-threshold", |
| 5843 | # "arguments": { "node-name": "mydev", |
| 5844 | # "write-threshold": 17179869184 } } |
| 5845 | # <- { "return": {} } |
Francesco Romani | e246211 | 2015-01-12 14:11:13 +0100 | [diff] [blame] | 5846 | ## |
| 5847 | { 'command': 'block-set-write-threshold', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 5848 | 'data': { 'node-name': 'str', 'write-threshold': 'uint64' }, |
| 5849 | 'allow-preconfig': true } |
Wen Congyang | 7f82159 | 2016-05-10 15:36:39 +0800 | [diff] [blame] | 5850 | |
| 5851 | ## |
Marc-André Lureau | 5072f7b | 2016-11-17 19:54:55 +0400 | [diff] [blame] | 5852 | # @x-blockdev-change: |
Wen Congyang | 7f82159 | 2016-05-10 15:36:39 +0800 | [diff] [blame] | 5853 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5854 | # Dynamically reconfigure the block driver state graph. It can be |
| 5855 | # used to add, remove, insert or replace a graph node. Currently only |
| 5856 | # the Quorum driver implements this feature to add or remove its |
| 5857 | # child. This is useful to fix a broken quorum child. |
Wen Congyang | 7f82159 | 2016-05-10 15:36:39 +0800 | [diff] [blame] | 5858 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5859 | # If @node is specified, it will be inserted under @parent. @child |
| 5860 | # may not be specified in this case. If both @parent and @child are |
Wen Congyang | 7f82159 | 2016-05-10 15:36:39 +0800 | [diff] [blame] | 5861 | # specified but @node is not, @child will be detached from @parent. |
| 5862 | # |
| 5863 | # @parent: the id or name of the parent node. |
| 5864 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 5865 | # @child: the name of a child under the given parent node. |
Wen Congyang | 7f82159 | 2016-05-10 15:36:39 +0800 | [diff] [blame] | 5866 | # |
Markus Armbruster | 1d8bda1 | 2017-03-15 13:57:06 +0100 | [diff] [blame] | 5867 | # @node: the name of the node that will be added. |
Wen Congyang | 7f82159 | 2016-05-10 15:36:39 +0800 | [diff] [blame] | 5868 | # |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 5869 | # Features: |
Wen Congyang | 7f82159 | 2016-05-10 15:36:39 +0800 | [diff] [blame] | 5870 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5871 | # @unstable: This command is experimental, and its API is not stable. |
| 5872 | # It does not support all kinds of operations, all kinds of |
| 5873 | # children, nor all block drivers. |
Kevin Wolf | 6b4738c | 2017-12-15 11:54:22 +0100 | [diff] [blame] | 5874 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5875 | # FIXME Removing children from a quorum node means introducing |
| 5876 | # gaps in the child indices. This cannot be represented in the |
| 5877 | # 'children' list of BlockdevOptionsQuorum, as returned by |
| 5878 | # .bdrv_refresh_filename(). |
| 5879 | # |
| 5880 | # Warning: The data in a new quorum child MUST be consistent with |
| 5881 | # that of the rest of the array. |
Wen Congyang | 7f82159 | 2016-05-10 15:36:39 +0800 | [diff] [blame] | 5882 | # |
| 5883 | # Since: 2.7 |
Marc-André Lureau | bd77ea2 | 2016-06-23 15:28:23 +0200 | [diff] [blame] | 5884 | # |
John Snow | a9eab6e | 2024-07-16 22:13:09 -0400 | [diff] [blame] | 5885 | # .. qmp-example:: |
| 5886 | # :title: Add a new node to a quorum |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5887 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 5888 | # -> { "execute": "blockdev-add", |
| 5889 | # "arguments": { |
| 5890 | # "driver": "raw", |
| 5891 | # "node-name": "new_node", |
| 5892 | # "file": { "driver": "file", |
| 5893 | # "filename": "test.raw" } } } |
| 5894 | # <- { "return": {} } |
| 5895 | # -> { "execute": "x-blockdev-change", |
| 5896 | # "arguments": { "parent": "disk1", |
| 5897 | # "node": "new_node" } } |
| 5898 | # <- { "return": {} } |
Marc-André Lureau | bd77ea2 | 2016-06-23 15:28:23 +0200 | [diff] [blame] | 5899 | # |
John Snow | a9eab6e | 2024-07-16 22:13:09 -0400 | [diff] [blame] | 5900 | # .. qmp-example:: |
| 5901 | # :title: Delete a quorum's node |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5902 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 5903 | # -> { "execute": "x-blockdev-change", |
| 5904 | # "arguments": { "parent": "disk1", |
| 5905 | # "child": "children.1" } } |
| 5906 | # <- { "return": {} } |
Wen Congyang | 7f82159 | 2016-05-10 15:36:39 +0800 | [diff] [blame] | 5907 | ## |
| 5908 | { 'command': 'x-blockdev-change', |
| 5909 | 'data' : { 'parent': 'str', |
| 5910 | '*child': 'str', |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 5911 | '*node': 'str' }, |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 5912 | 'features': [ 'unstable' ], |
| 5913 | 'allow-preconfig': true } |
Stefan Hajnoczi | ca00bbb | 2017-12-06 14:45:49 +0000 | [diff] [blame] | 5914 | |
| 5915 | ## |
| 5916 | # @x-blockdev-set-iothread: |
| 5917 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5918 | # Move @node and its children into the @iothread. If @iothread is |
| 5919 | # null then move @node and its children into the main loop. |
Stefan Hajnoczi | ca00bbb | 2017-12-06 14:45:49 +0000 | [diff] [blame] | 5920 | # |
| 5921 | # The node must not be attached to a BlockBackend. |
| 5922 | # |
| 5923 | # @node-name: the name of the block driver node |
| 5924 | # |
| 5925 | # @iothread: the name of the IOThread object or null for the main loop |
| 5926 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5927 | # @force: true if the node and its children should be moved when a |
| 5928 | # BlockBackend is already attached |
Stefan Hajnoczi | 882e9b8 | 2017-12-07 20:13:17 +0000 | [diff] [blame] | 5929 | # |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 5930 | # Features: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5931 | # |
| 5932 | # @unstable: This command is experimental and intended for test cases |
| 5933 | # that need control over IOThreads only. |
Stefan Hajnoczi | ca00bbb | 2017-12-06 14:45:49 +0000 | [diff] [blame] | 5934 | # |
| 5935 | # Since: 2.12 |
| 5936 | # |
John Snow | a9eab6e | 2024-07-16 22:13:09 -0400 | [diff] [blame] | 5937 | # .. qmp-example:: |
| 5938 | # :title: Move a node into an IOThread |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5939 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 5940 | # -> { "execute": "x-blockdev-set-iothread", |
| 5941 | # "arguments": { "node-name": "disk1", |
| 5942 | # "iothread": "iothread0" } } |
| 5943 | # <- { "return": {} } |
Stefan Hajnoczi | ca00bbb | 2017-12-06 14:45:49 +0000 | [diff] [blame] | 5944 | # |
John Snow | a9eab6e | 2024-07-16 22:13:09 -0400 | [diff] [blame] | 5945 | # .. qmp-example:: |
| 5946 | # :title: Move a node into the main loop |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 5947 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 5948 | # -> { "execute": "x-blockdev-set-iothread", |
| 5949 | # "arguments": { "node-name": "disk1", |
| 5950 | # "iothread": null } } |
| 5951 | # <- { "return": {} } |
Stefan Hajnoczi | ca00bbb | 2017-12-06 14:45:49 +0000 | [diff] [blame] | 5952 | ## |
| 5953 | { 'command': 'x-blockdev-set-iothread', |
| 5954 | 'data' : { 'node-name': 'str', |
Stefan Hajnoczi | 882e9b8 | 2017-12-07 20:13:17 +0000 | [diff] [blame] | 5955 | 'iothread': 'StrOrNull', |
Markus Armbruster | 9fb49da | 2021-10-28 12:25:13 +0200 | [diff] [blame] | 5956 | '*force': 'bool' }, |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 5957 | 'features': [ 'unstable' ], |
| 5958 | 'allow-preconfig': true } |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 5959 | |
| 5960 | ## |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 5961 | # @QuorumOpType: |
| 5962 | # |
| 5963 | # An enumeration of the quorum operation types |
| 5964 | # |
| 5965 | # @read: read operation |
| 5966 | # |
| 5967 | # @write: write operation |
| 5968 | # |
| 5969 | # @flush: flush operation |
| 5970 | # |
| 5971 | # Since: 2.6 |
| 5972 | ## |
| 5973 | { 'enum': 'QuorumOpType', |
| 5974 | 'data': [ 'read', 'write', 'flush' ] } |
| 5975 | |
| 5976 | ## |
| 5977 | # @QUORUM_FAILURE: |
| 5978 | # |
| 5979 | # Emitted by the Quorum block driver if it fails to establish a quorum |
| 5980 | # |
| 5981 | # @reference: device name if defined else node name |
| 5982 | # |
| 5983 | # @sector-num: number of the first sector of the failed read operation |
| 5984 | # |
| 5985 | # @sectors-count: failed read operation sector count |
| 5986 | # |
John Snow | d461c27 | 2024-06-26 18:21:16 -0400 | [diff] [blame] | 5987 | # .. note:: This event is rate-limited. |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 5988 | # |
| 5989 | # Since: 2.0 |
| 5990 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 5991 | # .. qmp-example:: |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 5992 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 5993 | # <- { "event": "QUORUM_FAILURE", |
| 5994 | # "data": { "reference": "usr1", "sector-num": 345435, "sectors-count": 5 }, |
| 5995 | # "timestamp": { "seconds": 1344522075, "microseconds": 745528 } } |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 5996 | ## |
| 5997 | { 'event': 'QUORUM_FAILURE', |
| 5998 | 'data': { 'reference': 'str', 'sector-num': 'int', 'sectors-count': 'int' } } |
| 5999 | |
| 6000 | ## |
| 6001 | # @QUORUM_REPORT_BAD: |
| 6002 | # |
| 6003 | # Emitted to report a corruption of a Quorum file |
| 6004 | # |
| 6005 | # @type: quorum operation type (Since 2.6) |
| 6006 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 6007 | # @error: error message. Only present on failure. This field |
| 6008 | # contains a human-readable error message. There are no semantics |
| 6009 | # other than that the block layer reported an error and clients |
| 6010 | # should not try to interpret the error string. |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6011 | # |
| 6012 | # @node-name: the graph node name of the block driver state |
| 6013 | # |
| 6014 | # @sector-num: number of the first sector of the failed read operation |
| 6015 | # |
| 6016 | # @sectors-count: failed read operation sector count |
| 6017 | # |
John Snow | d461c27 | 2024-06-26 18:21:16 -0400 | [diff] [blame] | 6018 | # .. note:: This event is rate-limited. |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6019 | # |
| 6020 | # Since: 2.0 |
| 6021 | # |
John Snow | a9eab6e | 2024-07-16 22:13:09 -0400 | [diff] [blame] | 6022 | # .. qmp-example:: |
| 6023 | # :title: Read operation |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6024 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 6025 | # <- { "event": "QUORUM_REPORT_BAD", |
| 6026 | # "data": { "node-name": "node0", "sector-num": 345435, "sectors-count": 5, |
| 6027 | # "type": "read" }, |
| 6028 | # "timestamp": { "seconds": 1344522075, "microseconds": 745528 } } |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6029 | # |
John Snow | a9eab6e | 2024-07-16 22:13:09 -0400 | [diff] [blame] | 6030 | # .. qmp-example:: |
| 6031 | # :title: Flush operation |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6032 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 6033 | # <- { "event": "QUORUM_REPORT_BAD", |
| 6034 | # "data": { "node-name": "node0", "sector-num": 0, "sectors-count": 2097120, |
| 6035 | # "type": "flush", "error": "Broken pipe" }, |
| 6036 | # "timestamp": { "seconds": 1456406829, "microseconds": 291763 } } |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6037 | ## |
| 6038 | { 'event': 'QUORUM_REPORT_BAD', |
| 6039 | 'data': { 'type': 'QuorumOpType', '*error': 'str', 'node-name': 'str', |
| 6040 | 'sector-num': 'int', 'sectors-count': 'int' } } |
| 6041 | |
| 6042 | ## |
| 6043 | # @BlockdevSnapshotInternal: |
| 6044 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 6045 | # @device: the device name or node-name of a root node to generate the |
| 6046 | # snapshot from |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6047 | # |
| 6048 | # @name: the name of the internal snapshot to be created |
| 6049 | # |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6050 | # Since: 1.7 |
| 6051 | ## |
| 6052 | { 'struct': 'BlockdevSnapshotInternal', |
| 6053 | 'data': { 'device': 'str', 'name': 'str' } } |
| 6054 | |
| 6055 | ## |
| 6056 | # @blockdev-snapshot-internal-sync: |
| 6057 | # |
| 6058 | # Synchronously take an internal snapshot of a block device, when the |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 6059 | # format of the image used supports it. If the name is an empty |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6060 | # string, or a snapshot with name already exists, the operation will |
| 6061 | # fail. |
| 6062 | # |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 6063 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 6064 | # - If @device is not a valid block device, GenericError |
| 6065 | # - If any snapshot matching @name exists, or @name is empty, |
| 6066 | # GenericError |
| 6067 | # - If the format of the image used does not support it, |
| 6068 | # GenericError |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6069 | # |
Markus Armbruster | f0e0c46 | 2024-07-18 14:36:09 +0200 | [diff] [blame] | 6070 | # .. note:: Only some image formats such as qcow2 and rbd support |
| 6071 | # internal snapshots. |
| 6072 | # |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6073 | # Since: 1.7 |
| 6074 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 6075 | # .. qmp-example:: |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6076 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 6077 | # -> { "execute": "blockdev-snapshot-internal-sync", |
| 6078 | # "arguments": { "device": "ide-hd0", |
| 6079 | # "name": "snapshot0" } |
| 6080 | # } |
| 6081 | # <- { "return": {} } |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6082 | ## |
| 6083 | { 'command': 'blockdev-snapshot-internal-sync', |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 6084 | 'data': 'BlockdevSnapshotInternal', |
| 6085 | 'allow-preconfig': true } |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6086 | |
| 6087 | ## |
| 6088 | # @blockdev-snapshot-delete-internal-sync: |
| 6089 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 6090 | # Synchronously delete an internal snapshot of a block device, when |
| 6091 | # the format of the image used support it. The snapshot is identified |
| 6092 | # by name or id or both. One of the name or id is required. Return |
| 6093 | # SnapshotInfo for the successfully deleted snapshot. |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6094 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 6095 | # @device: the device name or node-name of a root node to delete the |
| 6096 | # snapshot from |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6097 | # |
| 6098 | # @id: optional the snapshot's ID to be deleted |
| 6099 | # |
| 6100 | # @name: optional the snapshot's name to be deleted |
| 6101 | # |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 6102 | # Returns: |
Markus Armbruster | e2c1dcb | 2024-02-27 12:39:14 +0100 | [diff] [blame] | 6103 | # SnapshotInfo |
Markus Armbruster | 2746f06 | 2024-02-27 12:39:12 +0100 | [diff] [blame] | 6104 | # |
| 6105 | # Errors: |
Markus Armbruster | a937b6a | 2023-04-28 12:54:29 +0200 | [diff] [blame] | 6106 | # - If @device is not a valid block device, GenericError |
| 6107 | # - If snapshot not found, GenericError |
| 6108 | # - If the format of the image used does not support it, |
| 6109 | # GenericError |
| 6110 | # - If @id and @name are both not specified, GenericError |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6111 | # |
| 6112 | # Since: 1.7 |
| 6113 | # |
John Snow | 14b48aa | 2024-07-16 22:13:08 -0400 | [diff] [blame] | 6114 | # .. qmp-example:: |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6115 | # |
Markus Armbruster | d23055b | 2024-02-16 15:58:34 +0100 | [diff] [blame] | 6116 | # -> { "execute": "blockdev-snapshot-delete-internal-sync", |
| 6117 | # "arguments": { "device": "ide-hd0", |
| 6118 | # "name": "snapshot0" } |
| 6119 | # } |
| 6120 | # <- { "return": { |
| 6121 | # "id": "1", |
| 6122 | # "name": "snapshot0", |
| 6123 | # "vm-state-size": 0, |
| 6124 | # "date-sec": 1000012, |
| 6125 | # "date-nsec": 10, |
| 6126 | # "vm-clock-sec": 100, |
| 6127 | # "vm-clock-nsec": 20, |
| 6128 | # "icount": 220414 |
| 6129 | # } |
| 6130 | # } |
Kevin Wolf | b3cf1ec | 2020-02-24 15:29:52 +0100 | [diff] [blame] | 6131 | ## |
| 6132 | { 'command': 'blockdev-snapshot-delete-internal-sync', |
| 6133 | 'data': { 'device': 'str', '*id': 'str', '*name': 'str'}, |
Paolo Bonzini | f55ba80 | 2020-11-03 04:37:20 -0500 | [diff] [blame] | 6134 | 'returns': 'SnapshotInfo', |
| 6135 | 'allow-preconfig': true } |
Hanna Reitz | 456e751 | 2022-06-20 18:26:55 +0200 | [diff] [blame] | 6136 | |
| 6137 | ## |
| 6138 | # @DummyBlockCoreForceArrays: |
| 6139 | # |
Hanna Reitz | c04d0ab | 2022-06-20 18:27:03 +0200 | [diff] [blame] | 6140 | # Not used by QMP; hack to let us use BlockGraphInfoList internally |
Hanna Reitz | 456e751 | 2022-06-20 18:26:55 +0200 | [diff] [blame] | 6141 | # |
| 6142 | # Since: 8.0 |
| 6143 | ## |
| 6144 | { 'struct': 'DummyBlockCoreForceArrays', |
Hanna Reitz | c04d0ab | 2022-06-20 18:27:03 +0200 | [diff] [blame] | 6145 | 'data': { 'unused-block-graph-info': ['BlockGraphInfo'] } } |