diff --git a/doc/dev/rbd-diff.rst b/doc/dev/rbd-diff.rst index 77a9a35d4c6..e258afd100b 100644 --- a/doc/dev/rbd-diff.rst +++ b/doc/dev/rbd-diff.rst @@ -5,15 +5,19 @@ This is a simple streaming file format for representing a diff between two snapshots (or a snapshot and the head) of an RBD image. Header ------- +~~~~~~ "rbd diff v1\n" -Record ------- +Metadata records +~~~~~~~~~~~~~~~~ -Every record has a one byte "tag" that identifies the record type, followed by some other -data. +Every record has a one byte "tag" that identifies the record type, +followed by some other data. + +Metadata records come in the first part of the image. Order is not +important, as long as all the metadata records come before the data +records. From snap --------- @@ -35,6 +39,11 @@ Size u8: 's' u64: (ending) image size +Data Records +~~~~~~~~~~~~ + +These records come in the second part of the sequence. + Updated data ------------ @@ -50,6 +59,10 @@ u8: 'z' le64: offset le64: length + +Final Record +~~~~~~~~~~~~ + End --- diff --git a/src/librbd/internal.h b/src/librbd/internal.h index e0ea13ba496..7f66006e12c 100644 --- a/src/librbd/internal.h +++ b/src/librbd/internal.h @@ -102,7 +102,7 @@ namespace librbd { int resize_helper(ImageCtx *ictx, uint64_t size, ProgressContext& prog_ctx); int snap_create(ImageCtx *ictx, const char *snap_name); int snap_list(ImageCtx *ictx, std::vector& snaps); - bool snap_list(ImageCtx *ictx, const char *snap_name); + bool snap_exists(ImageCtx *ictx, const char *snap_name); int snap_rollback(ImageCtx *ictx, const char *snap_name, ProgressContext& prog_ctx); int snap_remove(ImageCtx *ictx, const char *snap_name);