diff options
author | Greg Farnum <greg@inktank.com> | 2013-10-09 14:01:41 -0700 |
---|---|---|
committer | Greg Farnum <greg@inktank.com> | 2013-10-17 13:11:45 -0700 |
commit | b441406e308dc309a1801b64fea26ae967f5db67 (patch) | |
tree | 2f9387fde80ff73356128d95606b0feebbfd873b | |
parent | bacd234c62af2fb78b70c43a02913bf92c7f3b13 (diff) | |
download | ceph-b441406e308dc309a1801b64fea26ae967f5db67.tar.gz |
osd: add category to object_copy_data_t
We don't bump the encoding version -- and stick it in the middle --
since it's still brand-new. For simplicity, we encode it unconditionally
rather than trying to embed it alongside the attrs or with its own
"complete" flag in the cursor.
Signed-off-by: Greg Farnum <greg@inktank.com>
-rw-r--r-- | src/osd/ReplicatedPG.cc | 1 | ||||
-rw-r--r-- | src/osd/osd_types.cc | 2 | ||||
-rw-r--r-- | src/osd/osd_types.h | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 6fc4fdd9709..65381b237d9 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -4268,6 +4268,7 @@ int ReplicatedPG::fill_in_copy_get(bufferlist::iterator& bp, OSDOp& osd_op, // size, mtime reply_obj.size = oi.size; reply_obj.mtime = oi.mtime; + reply_obj.category = oi.category; // attrs map<string,bufferptr>& out_attrs = reply_obj.in_attrs; diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index 729c2a1647e..dabfaf08ce5 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -2549,6 +2549,7 @@ void object_copy_data_t::encode(bufferlist& bl) const ENCODE_START(1, 1, bl); ::encode(size, bl); ::encode(mtime, bl); + ::encode(category, bl); ::encode(in_attrs, bl); ::encode(data, bl); ::encode(omap, bl); @@ -2561,6 +2562,7 @@ void object_copy_data_t::decode(bufferlist::iterator& bl) DECODE_START(1, bl); ::decode(size, bl); ::decode(mtime, bl); + ::decode(category, bl); ::decode(attrs, bl); ::decode(data, bl); ::decode(omap, bl); diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index 84542e501a5..7ebe60716a1 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -1861,6 +1861,7 @@ struct object_copy_data_t { map<string, bufferlist> attrs; bufferlist data; map<string, bufferlist> omap; + string category; public: object_copy_data_t() : size((uint64_t)-1) {} |