]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cls_rbd: add logging for failed set_parent steps
authorDan Mick <dan.mick@inktank.com>
Mon, 9 Jul 2012 20:58:02 +0000 (13:58 -0700)
committerDan Mick <dan.mick@inktank.com>
Mon, 9 Jul 2012 20:58:02 +0000 (13:58 -0700)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
src/cls_rbd.cc

index 00d373c62523c783a01e7be894b2007bfd653349..7f1a0f32f5c7b7103bbb4ed4e9c767e31a496236 100644 (file)
@@ -782,16 +782,21 @@ int set_parent(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
     ::decode(snapid, iter);
     ::decode(size, iter);
   } catch (const buffer::error &err) {
+    CLS_LOG(20, "cls_rbd::set_parent: invalid decode");
     return -EINVAL;
   }
 
   int r = check_exists(hctx);
-  if (r < 0)
+  if (r < 0) {
+    CLS_LOG(20, "cls_rbd::set_parent: child already exists");
     return r;
+  }
 
   r = require_feature(hctx, RBD_FEATURE_LAYERING);
-  if (r < 0)
+  if (r < 0) {
+    CLS_LOG(20, "cls_rbd::set_parent: child does not support layering");
     return r;
+  }
 
   CLS_LOG(20, "set_parent pool=%lld id=%s snapid=%llu size=%llu",
          pool, id.c_str(), snapid.val, size);