From: Dan Mick Date: Mon, 9 Jul 2012 20:58:02 +0000 (-0700) Subject: cls_rbd: add logging for failed set_parent steps X-Git-Tag: v0.50~96^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ec87a1ea43f48ad5b10a57ecd26590288d52a2f2;p=ceph.git cls_rbd: add logging for failed set_parent steps Signed-off-by: Dan Mick --- diff --git a/src/cls_rbd.cc b/src/cls_rbd.cc index 00d373c62523..7f1a0f32f5c7 100644 --- a/src/cls_rbd.cc +++ b/src/cls_rbd.cc @@ -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);