]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: add an option merge-diff
authorMingXin Liu <mingxinliu@ubuntukylin.com>
Mon, 5 Jan 2015 09:29:39 +0000 (17:29 +0800)
committerLi Wang <liwang@ubuntukylin.com>
Mon, 5 Jan 2015 09:51:02 +0000 (17:51 +0800)
Signed-off-by: MingXin Liu <mingxinliu@ubuntukylin.com>
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Signed-off-by: Li Wang <liwang@ubuntukylin.com>
src/rbd.cc

index 26cb589dc1f1f828042301973ffb1552d1e187e4..cd595df4cca11599fd1bd00402732fe1fd7cbbd6 100644 (file)
@@ -103,6 +103,10 @@ void usage()
 "  export-diff <image-name> [--from-snap <snap-name>] <path>\n"
 "                                              export an incremental diff to\n"
 "                                              path, or \"-\" for stdout\n"
+"  merge-diff <diff1> <diff2> <path>           merge <diff1> and <diff2> into\n"
+"                                              <path>, <diff1> could be \"-\"\n"
+"                                              for stdin, and <path> could be \"-\"\n"
+"                                              for stdout\n"
 "  import-diff <path> <image-name>             import an incremental diff from\n"
 "                                              path or \"-\" for stdin\n"
 "  (cp | copy) <src> <dest>                    copy src image to dest\n"
@@ -1965,6 +1969,7 @@ enum {
   OPT_LOCK_ADD,
   OPT_LOCK_REMOVE,
   OPT_BENCH_WRITE,
+  OPT_MERGE_DIFF,
 };
 
 static int get_cmd(const char *cmd, bool snapcmd, bool lockcmd)
@@ -1991,6 +1996,8 @@ static int get_cmd(const char *cmd, bool snapcmd, bool lockcmd)
       return OPT_EXPORT;
     if (strcmp(cmd, "export-diff") == 0)
       return OPT_EXPORT_DIFF;
+    if (strcmp(cmd, "merge-diff") == 0)
+      return OPT_MERGE_DIFF;
     if (strcmp(cmd, "diff") == 0)
       return OPT_DIFF;
     if (strcmp(cmd, "import") == 0)