]> git.proxmox.com Git - pve-qemu-kvm.git/blob - debian/patches/backup-add-pve-monitor-commands.patch
re-add pve backup monitor commands
[pve-qemu-kvm.git] / debian / patches / backup-add-pve-monitor-commands.patch
1 Index: new/blockdev.c
2 ===================================================================
3 --- new.orig/blockdev.c 2013-12-02 07:42:33.000000000 +0100
4 +++ new/blockdev.c 2013-12-02 08:40:19.000000000 +0100
5 @@ -45,6 +45,7 @@
6 #include "qmp-commands.h"
7 #include "trace.h"
8 #include "sysemu/arch_init.h"
9 +#include "vma.h"
10
11 static QTAILQ_HEAD(drivelist, DriveInfo) drives = QTAILQ_HEAD_INITIALIZER(drives);
12
13 @@ -1438,6 +1439,412 @@
14 }
15 }
16
17 +/* PVE backup related function */
18 +
19 +static struct PVEBackupState {
20 + Error *error;
21 + bool cancel;
22 + uuid_t uuid;
23 + char uuid_str[37];
24 + int64_t speed;
25 + time_t start_time;
26 + time_t end_time;
27 + char *backup_file;
28 + VmaWriter *vmaw;
29 + GList *di_list;
30 + size_t total;
31 + size_t transferred;
32 + size_t zero_bytes;
33 +} backup_state;
34 +
35 +typedef struct PVEBackupDevInfo {
36 + BlockDriverState *bs;
37 + uint8_t dev_id;
38 + //bool started;
39 + bool completed;
40 +} PVEBackupDevInfo;
41 +
42 +static void pvebackup_run_next_job(void);
43 +
44 +static int pvebackup_dump_cb(void *opaque, BlockDriverState *bs,
45 + int64_t cluster_num, unsigned char *buf)
46 +{
47 + PVEBackupDevInfo *di = opaque;
48 +
49 + assert(backup_state.vmaw);
50 +
51 + size_t zero_bytes = 0;
52 + return vma_writer_write(backup_state.vmaw, di->dev_id, cluster_num,
53 + buf, &zero_bytes);
54 +}
55 +
56 +static void pvebackup_update_status(void)
57 +{
58 + g_assert(backup_state.vmaw);
59 +
60 + VmaStatus vmastat;
61 +
62 + vma_writer_get_status(backup_state.vmaw, &vmastat);
63 +
64 + uint64_t total = 0;
65 + uint64_t transferred = 0;
66 + uint64_t zero_bytes = 0;
67 +
68 + int i;
69 + for (i = 0; i < 256; i++) {
70 + if (vmastat.stream_info[i].size) {
71 + total += vmastat.stream_info[i].size;
72 + transferred += vmastat.stream_info[i].transferred;
73 + zero_bytes += vmastat.stream_info[i].zero_bytes;
74 + }
75 + }
76 +
77 + backup_state.total = total;
78 + backup_state.transferred = transferred;
79 + backup_state.zero_bytes = zero_bytes;
80 +}
81 +
82 +static void pvebackup_cleanup(void)
83 +{
84 + if (backup_state.vmaw) {
85 + backup_state.end_time = time(NULL);
86 + Error *local_err = NULL;
87 + pvebackup_update_status();
88 + vma_writer_close(backup_state.vmaw, &local_err);
89 + error_propagate(&backup_state.error, local_err);
90 + backup_state.vmaw = NULL;
91 + }
92 +
93 + if (backup_state.di_list) {
94 + GList *l = backup_state.di_list;
95 + while (l) {
96 + PVEBackupDevInfo *di = (PVEBackupDevInfo *)l->data;
97 + l = g_list_next(l);
98 + g_free(di);
99 + }
100 + g_list_free(backup_state.di_list);
101 + backup_state.di_list = NULL;
102 + }
103 +}
104 +
105 +static void pvebackup_complete_cb(void *opaque, int ret)
106 +{
107 + PVEBackupDevInfo *di = opaque;
108 +
109 + assert(backup_state.vmaw);
110 +
111 + di->completed = true;
112 +
113 + vma_writer_close_stream(backup_state.vmaw, di->dev_id);
114 +
115 + if (!backup_state.cancel) {
116 + pvebackup_run_next_job();
117 + }
118 +}
119 +
120 +static void pvebackup_cancel(void)
121 +{
122 + backup_state.cancel = true;
123 +
124 + if (!backup_state.error) {
125 + error_setg(&backup_state.error, "backup cancelled");
126 + }
127 +
128 + /* drain all i/o (awake jobs waiting for aio) */
129 + bdrv_drain_all();
130 +
131 + int job_count = 0;
132 + GList *l = backup_state.di_list;
133 + while (l) {
134 + PVEBackupDevInfo *di = (PVEBackupDevInfo *)l->data;
135 + l = g_list_next(l);
136 + BlockJob *job = di->bs->job;
137 + if (job) {
138 + job_count++;
139 + if (!di->completed) {
140 + block_job_cancel_sync(job);
141 + }
142 + }
143 + }
144 +
145 + pvebackup_cleanup();
146 +}
147 +
148 +void qmp_backup_cancel(Error **errp)
149 +{
150 + pvebackup_cancel();
151 +}
152 +
153 +static void pvebackup_run_next_job(void)
154 +{
155 + GList *l = backup_state.di_list;
156 + while (l) {
157 + PVEBackupDevInfo *di = (PVEBackupDevInfo *)l->data;
158 + l = g_list_next(l);
159 +
160 + if (di->bs && di->bs->job && !di->completed) {
161 + if (block_job_is_paused(di->bs->job)) {
162 + bool cancel = backup_state.error || backup_state.cancel;
163 + if (cancel) {
164 + block_job_cancel(di->bs->job);
165 + } else {
166 + block_job_resume(di->bs->job);
167 + }
168 + }
169 + return;
170 + }
171 + }
172 +
173 + pvebackup_cleanup();
174 +}
175 +
176 +char *qmp_backup(const char *backup_file, bool has_format,
177 + BackupFormat format,
178 + bool has_config_file, const char *config_file,
179 + bool has_devlist, const char *devlist,
180 + bool has_speed, int64_t speed, Error **errp)
181 +{
182 + BlockDriverState *bs;
183 + Error *local_err = NULL;
184 + uuid_t uuid;
185 + VmaWriter *vmaw = NULL;
186 + gchar **devs = NULL;
187 + GList *di_list = NULL;
188 + GList *l;
189 +
190 + if (backup_state.di_list) {
191 + error_set(errp, ERROR_CLASS_GENERIC_ERROR,
192 + "previous backup not finished");
193 + return NULL;
194 + }
195 +
196 + /* Todo: try to auto-detect format based on file name */
197 + format = has_format ? format : BACKUP_FORMAT_VMA;
198 +
199 + if (format != BACKUP_FORMAT_VMA) {
200 + error_set(errp, ERROR_CLASS_GENERIC_ERROR, "unknown backup format");
201 + return NULL;
202 + }
203 +
204 + if (has_devlist) {
205 + devs = g_strsplit_set(devlist, ",;:", -1);
206 +
207 + gchar **d = devs;
208 + while (d && *d) {
209 + bs = bdrv_find(*d);
210 + if (bs) {
211 + if (bdrv_is_read_only(bs)) {
212 + error_set(errp, QERR_DEVICE_IS_READ_ONLY, *d);
213 + goto err;
214 + }
215 + if (!bdrv_is_inserted(bs)) {
216 + error_set(errp, QERR_DEVICE_HAS_NO_MEDIUM, *d);
217 + goto err;
218 + }
219 + PVEBackupDevInfo *di = g_new0(PVEBackupDevInfo, 1);
220 + di->bs = bs;
221 + di_list = g_list_append(di_list, di);
222 + } else {
223 + error_set(errp, QERR_DEVICE_NOT_FOUND, *d);
224 + goto err;
225 + }
226 + d++;
227 + }
228 +
229 + } else {
230 +
231 + bs = NULL;
232 + while ((bs = bdrv_next(bs))) {
233 +
234 + if (!bdrv_is_inserted(bs) || bdrv_is_read_only(bs)) {
235 + continue;
236 + }
237 +
238 + PVEBackupDevInfo *di = g_new0(PVEBackupDevInfo, 1);
239 + di->bs = bs;
240 + di_list = g_list_append(di_list, di);
241 + }
242 + }
243 +
244 + if (!di_list) {
245 + error_set(errp, ERROR_CLASS_GENERIC_ERROR, "empty device list");
246 + goto err;
247 + }
248 +
249 + l = di_list;
250 + while (l) {
251 + PVEBackupDevInfo *di = (PVEBackupDevInfo *)l->data;
252 + l = g_list_next(l);
253 + if (di->bs->job) {
254 + error_set(errp, QERR_DEVICE_IN_USE, bdrv_get_device_name(di->bs));
255 + goto err;
256 + }
257 + }
258 +
259 + uuid_generate(uuid);
260 +
261 + vmaw = vma_writer_create(backup_file, uuid, &local_err);
262 + if (!vmaw) {
263 + if (error_is_set(&local_err)) {
264 + error_propagate(errp, local_err);
265 + }
266 + goto err;
267 + }
268 +
269 + /* register all devices for vma writer */
270 + l = di_list;
271 + while (l) {
272 + PVEBackupDevInfo *di = (PVEBackupDevInfo *)l->data;
273 + l = g_list_next(l);
274 +
275 + int64_t size = bdrv_getlength(di->bs);
276 + const char *devname = bdrv_get_device_name(di->bs);
277 + di->dev_id = vma_writer_register_stream(vmaw, devname, size);
278 + if (di->dev_id <= 0) {
279 + error_set(errp, ERROR_CLASS_GENERIC_ERROR,
280 + "register_stream failed");
281 + goto err;
282 + }
283 + }
284 +
285 + /* add configuration file to archive */
286 + if (has_config_file) {
287 + char *cdata = NULL;
288 + gsize clen = 0;
289 + GError *err = NULL;
290 + if (!g_file_get_contents(config_file, &cdata, &clen, &err)) {
291 + error_setg(errp, "unable to read file '%s'", config_file);
292 + goto err;
293 + }
294 +
295 + const char *basename = g_path_get_basename(config_file);
296 + if (vma_writer_add_config(vmaw, basename, cdata, clen) != 0) {
297 + error_setg(errp, "unable to add config data to vma archive");
298 + g_free(cdata);
299 + goto err;
300 + }
301 + g_free(cdata);
302 + }
303 +
304 + /* initialize global backup_state now */
305 +
306 + backup_state.cancel = false;
307 +
308 + if (backup_state.error) {
309 + error_free(backup_state.error);
310 + backup_state.error = NULL;
311 + }
312 +
313 + backup_state.speed = (has_speed && speed > 0) ? speed : 0;
314 +
315 + backup_state.start_time = time(NULL);
316 + backup_state.end_time = 0;
317 +
318 + if (backup_state.backup_file) {
319 + g_free(backup_state.backup_file);
320 + }
321 + backup_state.backup_file = g_strdup(backup_file);
322 +
323 + backup_state.vmaw = vmaw;
324 +
325 + uuid_copy(backup_state.uuid, uuid);
326 + uuid_unparse_lower(uuid, backup_state.uuid_str);
327 +
328 + backup_state.di_list = di_list;
329 +
330 + pvebackup_update_status();
331 +
332 + /* start all jobs (paused state) */
333 + l = di_list;
334 + while (l) {
335 + PVEBackupDevInfo *di = (PVEBackupDevInfo *)l->data;
336 + l = g_list_next(l);
337 +
338 + backup_start(di->bs, NULL, speed, MIRROR_SYNC_MODE_FULL,
339 + BLOCKDEV_ON_ERROR_REPORT, BLOCKDEV_ON_ERROR_REPORT,
340 + pvebackup_dump_cb, pvebackup_complete_cb, di, &local_err);
341 + if (local_err != NULL) {
342 + error_setg(&backup_state.error, "backup_job_create failed");
343 + pvebackup_cancel();
344 + }
345 + }
346 +
347 + if (!backup_state.error) {
348 + pvebackup_run_next_job(); // run one job
349 + }
350 +
351 + return g_strdup(backup_state.uuid_str);
352 +
353 +err:
354 +
355 + l = di_list;
356 + while (l) {
357 + g_free(l->data);
358 + l = g_list_next(l);
359 + }
360 + g_list_free(di_list);
361 +
362 + if (devs) {
363 + g_strfreev(devs);
364 + }
365 +
366 + if (vmaw) {
367 + Error *err = NULL;
368 + vma_writer_close(vmaw, &err);
369 + unlink(backup_file);
370 + }
371 +
372 + return NULL;
373 +}
374 +
375 +BackupStatus *qmp_query_backup(Error **errp)
376 +{
377 + BackupStatus *info = g_malloc0(sizeof(*info));
378 +
379 + if (!backup_state.start_time) {
380 + /* not started, return {} */
381 + return info;
382 + }
383 +
384 + info->has_status = true;
385 + info->has_start_time = true;
386 + info->start_time = backup_state.start_time;
387 +
388 + if (backup_state.backup_file) {
389 + info->has_backup_file = true;
390 + info->backup_file = g_strdup(backup_state.backup_file);
391 + }
392 +
393 + info->has_uuid = true;
394 + info->uuid = g_strdup(backup_state.uuid_str);
395 +
396 + if (backup_state.end_time) {
397 + if (backup_state.error) {
398 + info->status = g_strdup("error");
399 + info->has_errmsg = true;
400 + info->errmsg = g_strdup(error_get_pretty(backup_state.error));
401 + } else {
402 + info->status = g_strdup("done");
403 + }
404 + info->has_end_time = true;
405 + info->end_time = backup_state.end_time;
406 + } else {
407 + info->status = g_strdup("active");
408 + }
409 +
410 + if (backup_state.vmaw) {
411 + pvebackup_update_status();
412 + }
413 +
414 + info->has_total = true;
415 + info->total = backup_state.total;
416 + info->has_zero_bytes = true;
417 + info->zero_bytes = backup_state.zero_bytes;
418 + info->has_transferred = true;
419 + info->transferred = backup_state.transferred;
420 +
421 + return info;
422 +}
423
424 static void eject_device(BlockDriverState *bs, int force, Error **errp)
425 {
426 Index: new/hmp-commands.hx
427 ===================================================================
428 --- new.orig/hmp-commands.hx 2013-12-02 07:39:56.000000000 +0100
429 +++ new/hmp-commands.hx 2013-12-02 08:19:27.000000000 +0100
430 @@ -83,6 +83,35 @@
431 Copy data from a backing file into a block device.
432 ETEXI
433
434 + {
435 + .name = "backup",
436 + .args_type = "backupfile:s,speed:o?,devlist:s?",
437 + .params = "backupfile [speed [devlist]]",
438 + .help = "create a VM Backup.",
439 + .mhandler.cmd = hmp_backup,
440 + },
441 +
442 +STEXI
443 +@item backup
444 +@findex backup
445 +Create a VM backup.
446 +ETEXI
447 +
448 + {
449 + .name = "backup_cancel",
450 + .args_type = "",
451 + .params = "",
452 + .help = "cancel the current VM backup",
453 + .mhandler.cmd = hmp_backup_cancel,
454 + },
455 +
456 +STEXI
457 +@item backup_cancel
458 +@findex backup_cancel
459 +Cancel the current VM backup.
460 +
461 +ETEXI
462 +
463 {
464 .name = "block_job_set_speed",
465 .args_type = "device:B,speed:o",
466 @@ -1692,6 +1721,8 @@
467 show CPU statistics
468 @item info usernet
469 show user network stack connection states
470 +@item info backup
471 +show backup status
472 @item info migrate
473 show migration status
474 @item info migrate_capabilities
475 Index: new/hmp.c
476 ===================================================================
477 --- new.orig/hmp.c 2013-12-02 07:39:56.000000000 +0100
478 +++ new/hmp.c 2013-12-02 08:21:00.000000000 +0100
479 @@ -133,6 +133,38 @@
480 qapi_free_MouseInfoList(mice_list);
481 }
482
483 +void hmp_info_backup(Monitor *mon, const QDict *qdict)
484 +{
485 + BackupStatus *info;
486 +
487 + info = qmp_query_backup(NULL);
488 + if (info->has_status) {
489 + if (info->has_errmsg) {
490 + monitor_printf(mon, "Backup status: %s - %s\n",
491 + info->status, info->errmsg);
492 + } else {
493 + monitor_printf(mon, "Backup status: %s\n", info->status);
494 + }
495 + }
496 + if (info->has_backup_file) {
497 + int per = (info->has_total && info->total &&
498 + info->has_transferred && info->transferred) ?
499 + (info->transferred * 100)/info->total : 0;
500 + int zero_per = (info->has_total && info->total &&
501 + info->has_zero_bytes && info->zero_bytes) ?
502 + (info->zero_bytes * 100)/info->total : 0;
503 + monitor_printf(mon, "Backup file: %s\n", info->backup_file);
504 + monitor_printf(mon, "Backup uuid: %s\n", info->uuid);
505 + monitor_printf(mon, "Total size: %zd\n", info->total);
506 + monitor_printf(mon, "Transferred bytes: %zd (%d%%)\n",
507 + info->transferred, per);
508 + monitor_printf(mon, "Zero bytes: %zd (%d%%)\n",
509 + info->zero_bytes, zero_per);
510 + }
511 +
512 + qapi_free_BackupStatus(info);
513 +}
514 +
515 void hmp_info_migrate(Monitor *mon, const QDict *qdict)
516 {
517 MigrationInfo *info;
518 @@ -1194,6 +1226,37 @@
519 hmp_handle_error(mon, &error);
520 }
521
522 +void hmp_backup_cancel(Monitor *mon, const QDict *qdict)
523 +{
524 + Error *errp = NULL;
525 +
526 + qmp_backup_cancel(&errp);
527 +
528 + if (error_is_set(&errp)) {
529 + monitor_printf(mon, "%s\n", error_get_pretty(errp));
530 + error_free(errp);
531 + return;
532 + }
533 +}
534 +
535 +void hmp_backup(Monitor *mon, const QDict *qdict)
536 +{
537 + const char *backup_file = qdict_get_str(qdict, "backup-file");
538 + const char *devlist = qdict_get_try_str(qdict, "devlist");
539 + int64_t speed = qdict_get_try_int(qdict, "speed", 0);
540 +
541 + Error *errp = NULL;
542 +
543 + qmp_backup(backup_file, true, BACKUP_FORMAT_VMA, false, NULL, !!devlist,
544 + devlist, qdict_haskey(qdict, "speed"), speed, &errp);
545 +
546 + if (error_is_set(&errp)) {
547 + monitor_printf(mon, "%s\n", error_get_pretty(errp));
548 + error_free(errp);
549 + return;
550 + }
551 +}
552 +
553 void hmp_block_job_set_speed(Monitor *mon, const QDict *qdict)
554 {
555 Error *error = NULL;
556 Index: new/hmp.h
557 ===================================================================
558 --- new.orig/hmp.h 2013-12-02 07:39:56.000000000 +0100
559 +++ new/hmp.h 2013-12-02 08:22:00.000000000 +0100
560 @@ -28,6 +28,7 @@
561 void hmp_info_migrate(Monitor *mon, const QDict *qdict);
562 void hmp_info_migrate_capabilities(Monitor *mon, const QDict *qdict);
563 void hmp_info_migrate_cache_size(Monitor *mon, const QDict *qdict);
564 +void hmp_info_backup(Monitor *mon, const QDict *qdict);
565 void hmp_info_cpus(Monitor *mon, const QDict *qdict);
566 void hmp_info_block(Monitor *mon, const QDict *qdict);
567 void hmp_info_blockstats(Monitor *mon, const QDict *qdict);
568 @@ -69,6 +70,8 @@
569 void hmp_change(Monitor *mon, const QDict *qdict);
570 void hmp_block_set_io_throttle(Monitor *mon, const QDict *qdict);
571 void hmp_block_stream(Monitor *mon, const QDict *qdict);
572 +void hmp_backup(Monitor *mon, const QDict *qdict);
573 +void hmp_backup_cancel(Monitor *mon, const QDict *qdict);
574 void hmp_block_job_set_speed(Monitor *mon, const QDict *qdict);
575 void hmp_block_job_cancel(Monitor *mon, const QDict *qdict);
576 void hmp_block_job_pause(Monitor *mon, const QDict *qdict);
577 Index: new/monitor.c
578 ===================================================================
579 --- new.orig/monitor.c 2013-12-02 07:39:56.000000000 +0100
580 +++ new/monitor.c 2013-12-02 08:22:29.000000000 +0100
581 @@ -2880,6 +2880,13 @@
582 },
583 #endif
584 {
585 + .name = "backup",
586 + .args_type = "",
587 + .params = "",
588 + .help = "show backup status",
589 + .mhandler.cmd = hmp_info_backup,
590 + },
591 + {
592 .name = "migrate",
593 .args_type = "",
594 .params = "",
595 Index: new/qapi-schema.json
596 ===================================================================
597 --- new.orig/qapi-schema.json 2013-12-02 07:39:56.000000000 +0100
598 +++ new/qapi-schema.json 2013-12-02 08:16:27.000000000 +0100
599 @@ -547,6 +547,95 @@
600 ##
601 { 'command': 'query-events', 'returns': ['EventInfo'] }
602
603 +# @BackupStatus:
604 +#
605 +# Detailed backup status.
606 +#
607 +# @status: #optional string describing the current backup status.
608 +# This can be 'active', 'done', 'error'. If this field is not
609 +# returned, no backup process has been initiated
610 +#
611 +# @errmsg: #optional error message (only returned if status is 'error')
612 +#
613 +# @total: #optional total amount of bytes involved in the backup process
614 +#
615 +# @transferred: #optional amount of bytes already backed up.
616 +#
617 +# @zero-bytes: #optional amount of 'zero' bytes detected.
618 +#
619 +# @start-time: #optional time (epoch) when backup job started.
620 +#
621 +# @end-time: #optional time (epoch) when backup job finished.
622 +#
623 +# @backupfile: #optional backup file name
624 +#
625 +# @uuid: #optional uuid for this backup job
626 +#
627 +##
628 +{ 'type': 'BackupStatus',
629 + 'data': {'*status': 'str', '*errmsg': 'str', '*total': 'int',
630 + '*transferred': 'int', '*zero-bytes': 'int',
631 + '*start-time': 'int', '*end-time': 'int',
632 + '*backup-file': 'str', '*uuid': 'str' } }
633 +
634 +##
635 +# @BackupFormat
636 +#
637 +# An enumeration of supported backup formats.
638 +#
639 +# @vma: Proxmox vma backup format
640 +##
641 +{ 'enum': 'BackupFormat',
642 + 'data': [ 'vma' ] }
643 +
644 +##
645 +# @backup:
646 +#
647 +# Starts a VM backup.
648 +#
649 +# @backup-file: the backup file name
650 +#
651 +# @format: format of the backup file
652 +#
653 +# @config-filename: #optional name of a configuration file to include into
654 +# the backup archive.
655 +#
656 +# @speed: #optional the maximum speed, in bytes per second
657 +#
658 +# @devlist: #optional list of block device names (separated by ',', ';'
659 +# or ':'). By default the backup includes all writable block devices.
660 +#
661 +# Returns: the uuid of the backup job
662 +#
663 +##
664 +{ 'command': 'backup', 'data': { 'backup-file': 'str',
665 + '*format': 'BackupFormat',
666 + '*config-file': 'str',
667 + '*devlist': 'str', '*speed': 'int' },
668 + 'returns': 'str' }
669 +
670 +##
671 +# @query-backup
672 +#
673 +# Returns information about current/last backup task.
674 +#
675 +# Returns: @BackupStatus
676 +#
677 +##
678 +{ 'command': 'query-backup', 'returns': 'BackupStatus' }
679 +
680 +##
681 +# @backup-cancel
682 +#
683 +# Cancel the current executing backup process.
684 +#
685 +# Returns: nothing on success
686 +#
687 +# Notes: This command succeeds even if there is no backup process running.
688 +#
689 +##
690 +{ 'command': 'backup-cancel' }
691 +
692 ##
693 # @MigrationStats
694 #
695 Index: new/qmp-commands.hx
696 ===================================================================
697 --- new.orig/qmp-commands.hx 2013-12-02 07:39:56.000000000 +0100
698 +++ new/qmp-commands.hx 2013-12-02 08:19:45.000000000 +0100
699 @@ -966,6 +966,24 @@
700 EQMP
701
702 {
703 + .name = "backup",
704 + .args_type = "backup-file:s,format:s?,config-file:F?,speed:o?,devlist:s?",
705 + .mhandler.cmd_new = qmp_marshal_input_backup,
706 + },
707 +
708 + {
709 + .name = "backup-cancel",
710 + .args_type = "",
711 + .mhandler.cmd_new = qmp_marshal_input_backup_cancel,
712 + },
713 +
714 + {
715 + .name = "query-backup",
716 + .args_type = "",
717 + .mhandler.cmd_new = qmp_marshal_input_query_backup,
718 + },
719 +
720 + {
721 .name = "block-job-set-speed",
722 .args_type = "device:B,speed:o",
723 .mhandler.cmd_new = qmp_marshal_input_block_job_set_speed,