]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tools: fix tabletool reset of nonexistent sessionmap 4522/head
authorJohn Spray <john.spray@redhat.com>
Mon, 11 May 2015 11:53:52 +0000 (12:53 +0100)
committerJohn Spray <john.spray@redhat.com>
Tue, 12 May 2015 09:23:27 +0000 (10:23 +0100)
If the object didn't exist, the omap clear was failing
and preventing the subsueent omap set header from
executing.  Set the FAILOK flag on the omap clear
sub-operation.

Signed-off-by: John Spray <john.spray@redhat.com>
src/tools/cephfs/TableTool.cc

index 8afdebe2023ac5a39ebbe2b0ea9a6a32d012b4ed..b54256f3dea6434996be7197d961cf41d46196f9 100644 (file)
@@ -353,6 +353,7 @@ public:
     // Compose a transaction to clear and write header
     librados::ObjectWriteOperation op;
     op.omap_clear();
+    op.set_op_flags(librados::OP_FAILOK);
     op.omap_set_header(header_bl);
     
     return io->operate(object_name, &op);