]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
BlueStore: differentiate error code for better tracing
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 6 Jan 2016 06:45:41 +0000 (14:45 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 14 Jan 2016 05:45:34 +0000 (13:45 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index ef706d434182108381d79e752b358f241c53724e..9b1641464445ef176219b0fc4b5c7e05133649cf 100644 (file)
@@ -374,7 +374,7 @@ static int get_key_object(const string& key, ghobject_t *oid)
     ++p;
     r = decode_escaped(p, &oid->hobj.oid.name);
     if (r < 0)
-      return -8;
+      return -7;
     p += r + 1;
   } else if (*p == '<' || *p == '>') {
     // key + name
@@ -391,15 +391,15 @@ static int get_key_object(const string& key, ghobject_t *oid)
     oid->hobj.set_key(okey);
   } else {
     // malformed
-    return -7;
+    return -10;
   }
 
   p = _key_decode_u64(p, &oid->hobj.snap.val);
   if (!p)
-    return -10;
+    return -11;
   p = _key_decode_u64(p, &oid->generation);
   if (!p)
-    return -11;
+    return -12;
   return 0;
 }