Lines Matching full:backup

1574 static BlockJob *do_backup_common(BackupCommon *backup,
1589 static void drive_backup_action(DriveBackup *backup, in drive_backup_action() argument
1610 if (!backup->has_mode) { in drive_backup_action()
1611 backup->mode = NEW_IMAGE_MODE_ABSOLUTE_PATHS; in drive_backup_action()
1614 bs = bdrv_lookup_bs(backup->device, backup->device, errp); in drive_backup_action()
1630 format = backup->format; in drive_backup_action()
1631 if (!format && backup->mode != NEW_IMAGE_MODE_EXISTING) { in drive_backup_action()
1648 if (backup->sync == MIRROR_SYNC_MODE_TOP) { in drive_backup_action()
1650 * Backup will not replace the source by the target, so none in drive_backup_action()
1657 backup->sync = MIRROR_SYNC_MODE_FULL; in drive_backup_action()
1660 if (backup->sync == MIRROR_SYNC_MODE_NONE) { in drive_backup_action()
1673 if (backup->mode != NEW_IMAGE_MODE_EXISTING) { in drive_backup_action()
1684 bdrv_img_create(backup->target, format, in drive_backup_action()
1689 bdrv_img_create(backup->target, format, NULL, NULL, NULL, in drive_backup_action()
1706 target_bs = bdrv_open(backup->target, NULL, options, flags, errp); in drive_backup_action()
1723 state->job = do_backup_common(qapi_DriveBackup_base(backup), in drive_backup_action()
1773 static void blockdev_backup_action(BlockdevBackup *backup, in blockdev_backup_action() argument
1785 bs = bdrv_lookup_bs(backup->device, backup->device, errp); in blockdev_backup_action()
1790 target_bs = bdrv_lookup_bs(backup->target, backup->target, errp); in blockdev_backup_action()
1808 state->job = do_backup_common(qapi_BlockdevBackup_base(backup), in blockdev_backup_action()
1844 HBitmap *backup; member
1913 bdrv_clear_dirty_bitmap(state->bitmap, &state->backup); in block_dirty_bitmap_clear_action()
1920 if (state->backup) { in block_dirty_bitmap_restore()
1921 bdrv_restore_dirty_bitmap(state->bitmap, state->backup); in block_dirty_bitmap_restore()
1929 hbitmap_free(state->backup); in block_dirty_bitmap_free_backup()
2022 action->bitmaps, &state->backup, in block_dirty_bitmap_merge_action()
2133 * Although these blockjobs use transaction callbacks like the backup job, in transaction_action()
2617 /* Common QMP interface for drive-backup and blockdev-backup */
2618 static BlockJob *do_backup_common(BackupCommon *backup, in do_backup_common() argument
2629 if (!backup->has_speed) { in do_backup_common()
2630 backup->speed = 0; in do_backup_common()
2632 if (!backup->has_on_source_error) { in do_backup_common()
2633 backup->on_source_error = BLOCKDEV_ON_ERROR_REPORT; in do_backup_common()
2635 if (!backup->has_on_target_error) { in do_backup_common()
2636 backup->on_target_error = BLOCKDEV_ON_ERROR_REPORT; in do_backup_common()
2638 if (!backup->has_auto_finalize) { in do_backup_common()
2639 backup->auto_finalize = true; in do_backup_common()
2641 if (!backup->has_auto_dismiss) { in do_backup_common()
2642 backup->auto_dismiss = true; in do_backup_common()
2644 if (!backup->has_compress) { in do_backup_common()
2645 backup->compress = false; in do_backup_common()
2648 if (backup->x_perf) { in do_backup_common()
2649 if (backup->x_perf->has_use_copy_range) { in do_backup_common()
2650 perf.use_copy_range = backup->x_perf->use_copy_range; in do_backup_common()
2652 if (backup->x_perf->has_max_workers) { in do_backup_common()
2653 perf.max_workers = backup->x_perf->max_workers; in do_backup_common()
2655 if (backup->x_perf->has_max_chunk) { in do_backup_common()
2656 perf.max_chunk = backup->x_perf->max_chunk; in do_backup_common()
2658 if (backup->x_perf->has_min_cluster_size) { in do_backup_common()
2659 perf.min_cluster_size = backup->x_perf->min_cluster_size; in do_backup_common()
2663 if ((backup->sync == MIRROR_SYNC_MODE_BITMAP) || in do_backup_common()
2664 (backup->sync == MIRROR_SYNC_MODE_INCREMENTAL)) { in do_backup_common()
2666 if (!backup->bitmap) { in do_backup_common()
2668 "'%s' sync mode", MirrorSyncMode_str(backup->sync)); in do_backup_common()
2673 if (backup->sync == MIRROR_SYNC_MODE_INCREMENTAL) { in do_backup_common()
2674 if (backup->has_bitmap_mode && in do_backup_common()
2675 backup->bitmap_mode != BITMAP_SYNC_MODE_ON_SUCCESS) { in do_backup_common()
2679 MirrorSyncMode_str(backup->sync)); in do_backup_common()
2682 backup->has_bitmap_mode = true; in do_backup_common()
2683 backup->sync = MIRROR_SYNC_MODE_BITMAP; in do_backup_common()
2684 backup->bitmap_mode = BITMAP_SYNC_MODE_ON_SUCCESS; in do_backup_common()
2687 if (backup->bitmap) { in do_backup_common()
2688 bmap = bdrv_find_dirty_bitmap(bs, backup->bitmap); in do_backup_common()
2690 error_setg(errp, "Bitmap '%s' could not be found", backup->bitmap); in do_backup_common()
2693 if (!backup->has_bitmap_mode) { in do_backup_common()
2703 if (backup->sync == MIRROR_SYNC_MODE_NONE) { in do_backup_common()
2705 " outputs", MirrorSyncMode_str(backup->sync)); in do_backup_common()
2710 if (backup->bitmap_mode == BITMAP_SYNC_MODE_NEVER && in do_backup_common()
2711 backup->sync != MIRROR_SYNC_MODE_BITMAP) { in do_backup_common()
2714 BitmapSyncMode_str(backup->bitmap_mode), in do_backup_common()
2715 MirrorSyncMode_str(backup->sync)); in do_backup_common()
2720 if (!backup->bitmap && backup->has_bitmap_mode) { in do_backup_common()
2725 if (!backup->auto_finalize) { in do_backup_common()
2728 if (!backup->auto_dismiss) { in do_backup_common()
2732 job = backup_job_create(backup->job_id, bs, target_bs, backup->speed, in do_backup_common()
2733 backup->sync, bmap, backup->bitmap_mode, in do_backup_common()
2734 backup->compress, backup->discard_source, in do_backup_common()
2735 backup->filter_node_name, in do_backup_common()
2737 backup->on_source_error, in do_backup_common()
2738 backup->on_target_error, in do_backup_common()
2743 void qmp_drive_backup(DriveBackup *backup, Error **errp) in qmp_drive_backup() argument
2747 .u.drive_backup.data = backup, in qmp_drive_backup()
2768 void qmp_blockdev_backup(BlockdevBackup *backup, Error **errp) in qmp_blockdev_backup() argument
2772 .u.blockdev_backup.data = backup, in qmp_blockdev_backup()