*
* encoded u64: snap
* encoded u64: generation
+ * 'o'
*/
+#define ONODE_KEY_SUFFIX 'o'
/*
* string encoding in the key
*
* object prefix key
* u32
- * 'x' (this char can be anything that is not part of a u64 (hex)
- * encoding so we can distinguish this key from an object key)
+ * 'x'
*/
#define EXTENT_SHARD_KEY_SUFFIX 'x'
_key_encode_u64(oid.hobj.snap, key);
_key_encode_u64(oid.generation, key);
+ key->push_back(ONODE_KEY_SUFFIX);
+
// sanity check
if (true) {
ghobject_t t;
p = _key_decode_u64(p, &oid->hobj.snap.val);
p = _key_decode_u64(p, &oid->generation);
+
+ if (*p != ONODE_KEY_SUFFIX) {
+ return -7;
+ }
+ p++;
if (*p) {
// if we get something other than a null terminator here,
// something goes wrong.
- return -7;
+ return -8;
}
return 0;