]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: add category to object_copy_data_t
authorGreg Farnum <greg@inktank.com>
Fri, 25 Oct 2013 20:41:29 +0000 (13:41 -0700)
committerGreg Farnum <greg@inktank.com>
Fri, 25 Oct 2013 20:52:56 +0000 (13:52 -0700)
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>
src/osd/ReplicatedPG.cc
src/osd/osd_types.cc
src/osd/osd_types.h

index 6d1bdbd0c31e0ed580c9f1e7f4fb74c970404e0d..16f12c1d272090ac50cc7cf695606dad3ff9a78d 100644 (file)
@@ -4278,6 +4278,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,bufferlist>& out_attrs = reply_obj.attrs;
index e3867905dc767d9d7b61eeac5082859e45ae5354..05b83c4af21bd86f6bf6d2c77f1b2d517d0dc21c 100644 (file)
@@ -2550,6 +2550,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(attrs, bl);
   ::encode(data, bl);
   ::encode(omap, bl);
@@ -2562,6 +2563,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);
index c9f518e638d282665dabf05bcdbe0cc3915f0841..54fd52106c6d4041d696a19a83d94b5cf5ac5483 100644 (file)
@@ -1878,6 +1878,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) {}