summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-10-15 15:01:53 -0700
committerSage Weil <sage@inktank.com>2013-10-15 15:02:32 -0700
commit0b70c536234d60a98199fbe5bcdb5da55713fa26 (patch)
tree5f8900da53885fc491b11e5a310e3b6063aa3a8f
parent5aa237e8a8055502ee588ebccee3c5ad9a2ebf94 (diff)
downloadceph-wip-4047.tar.gz
cls_rbd: do not make noise in osd log on rbd removalwip-4047
ubuntu@burnupi06:~$ tail -f /var/log/ceph/ceph-osd.1.log 2013-02-07 17:00:30.565749 7fdb09e6b700 0 <cls> cls/rbd/cls_rbd.cc:1615: error reading id for name 'sds': -2 2013-02-07 17:00:30.566301 7fdb0a66c700 0 <cls> cls/rbd/cls_rbd.cc:1521: error reading name to id mapping: -2 2013-02-07 17:03:54.085700 7fdb0a66c700 0 <cls> cls/rbd/cls_rbd.cc:1615: error reading id for name 'sdfsd': -2 2013-02-07 17:03:54.086143 7fdb09e6b700 0 <cls> cls/rbd/cls_rbd.cc:1521: error reading name to id mapping: -2 Fixes: #4047 Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/cls/rbd/cls_rbd.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cls/rbd/cls_rbd.cc b/src/cls/rbd/cls_rbd.cc
index 12947a08540..adfe4626caa 100644
--- a/src/cls/rbd/cls_rbd.cc
+++ b/src/cls/rbd/cls_rbd.cc
@@ -1524,7 +1524,7 @@ static int dir_remove_image_helper(cls_method_context_t hctx,
string name_key = dir_key_for_name(name);
string id_key = dir_key_for_id(id);
int r = read_key(hctx, name_key, &stored_id);
- if (r < 0) {
+ if (r < 0 && r != -ENOENT) {
CLS_ERR("error reading name to id mapping: %d", r);
return r;
}
@@ -1618,7 +1618,7 @@ int dir_get_id(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
string id;
int r = read_key(hctx, dir_key_for_name(name), &id);
- if (r < 0) {
+ if (r < 0 && r != -ENOENT) {
CLS_ERR("error reading id for name '%s': %d", name.c_str(), r);
return r;
}