2016-07-27 10:01:43 +03:00
|
|
|
/*
|
|
|
|
* QEMU backup
|
|
|
|
*
|
|
|
|
* Copyright (c) 2013 Proxmox Server Solutions
|
|
|
|
* Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
|
|
|
|
* Copyright (c) 2016 Intel Corporation
|
|
|
|
* Copyright (c) 2016 FUJITSU LIMITED
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Dietmar Maurer <dietmar@proxmox.com>
|
|
|
|
* Changlong Xie <xiecl.fnst@cn.fujitsu.com>
|
|
|
|
*
|
|
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
|
|
* See the COPYING file in the top-level directory.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef BLOCK_BACKUP_H
|
|
|
|
#define BLOCK_BACKUP_H
|
|
|
|
|
|
|
|
#include "block/block_int.h"
|
|
|
|
|
2016-07-27 10:01:44 +03:00
|
|
|
typedef struct CowRequest {
|
2017-07-07 15:44:54 +03:00
|
|
|
int64_t start_byte;
|
|
|
|
int64_t end_byte;
|
2016-07-27 10:01:44 +03:00
|
|
|
QLIST_ENTRY(CowRequest) list;
|
|
|
|
CoQueue wait_queue; /* coroutines blocked on this request */
|
|
|
|
} CowRequest;
|
|
|
|
|
2017-07-07 15:44:54 +03:00
|
|
|
void backup_wait_for_overlapping_requests(BlockJob *job, int64_t offset,
|
|
|
|
uint64_t bytes);
|
2016-07-27 10:01:44 +03:00
|
|
|
void backup_cow_request_begin(CowRequest *req, BlockJob *job,
|
2017-07-07 15:44:54 +03:00
|
|
|
int64_t offset, uint64_t bytes);
|
2016-07-27 10:01:44 +03:00
|
|
|
void backup_cow_request_end(CowRequest *req);
|
|
|
|
|
2016-07-27 10:01:43 +03:00
|
|
|
void backup_do_checkpoint(BlockJob *job, Error **errp);
|
|
|
|
|
|
|
|
#endif
|