From: Junyan He <junyan...@intel.com> We want to support incremental snapshot saving, this needs the file system support dependency saving. Later snapshots may ref the dependent snapshot's content, and most time should be cluster aligned. Add a query function to check whether the file system support this, and use the save_dependency function to do the real work.
Signed-off-by: Junyan He <junyan...@intel.com> --- include/block/block_int.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/block/block_int.h b/include/block/block_int.h index 64a5700..be1eca3 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -274,6 +274,15 @@ struct BlockDriver { const char *snapshot_id, const char *name, Error **errp); + int (*bdrv_snapshot_save_dependency)(BlockDriverState *bs, + const char *depend_snapshot_id, + int64_t depend_offset, + int64_t depend_size, + int64_t offset, + Error **errp); + int (*bdrv_snapshot_support_dependency)(BlockDriverState *bs, + int32_t *alignment); + int (*bdrv_get_info)(BlockDriverState *bs, BlockDriverInfo *bdi); ImageInfoSpecific *(*bdrv_get_specific_info)(BlockDriverState *bs); -- 2.7.4