diff options
author | Greg Farnum <greg@inktank.com> | 2013-10-09 14:01:41 -0700 |
---|---|---|
committer | Greg Farnum <greg@inktank.com> | 2013-10-09 16:14:24 -0700 |
commit | 0479f891ada20c3205c55e386b6de4bb19aae88c (patch) | |
tree | 80f8f6678693284ebaad6cb69e05c191839c1e65 | |
parent | f23d0433336c3cc101dbfe45429d306fe29abc2a (diff) | |
download | ceph-0479f891ada20c3205c55e386b6de4bb19aae88c.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) {} |