Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
[qemu/ar7.git] / block / backup-top.h
blobb28b0031c456bf783e769f4042aba958f5f54df0
1 /*
2 * backup-top filter driver
4 * The driver performs Copy-Before-Write (CBW) operation: it is injected above
5 * some node, and before each write it copies _old_ data to the target node.
7 * Copyright (c) 2018-2019 Virtuozzo International GmbH.
9 * Author:
10 * Sementsov-Ogievskiy Vladimir <vsementsov@virtuozzo.com>
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 #ifndef BACKUP_TOP_H
27 #define BACKUP_TOP_H
29 #include "block/block_int.h"
30 #include "block/block-copy.h"
32 BlockDriverState *bdrv_backup_top_append(BlockDriverState *source,
33 BlockDriverState *target,
34 const char *filter_node_name,
35 uint64_t cluster_size,
36 BackupPerf *perf,
37 BdrvRequestFlags write_flags,
38 BlockCopyState **bcs,
39 Error **errp);
40 void bdrv_backup_top_drop(BlockDriverState *bs);
42 #endif /* BACKUP_TOP_H */