From 5ecdce3b8793c9edd3d33227a3475572a5deccc1 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 31 Oct 2014 09:52:16 -0700 Subject: [PATCH] osdc/Objecter: drop category from copy-get Signed-off-by: Sage Weil --- src/osd/ReplicatedPG.cc | 3 --- src/osd/ReplicatedPG.h | 1 - src/osd/osd_types.cc | 7 +++++-- src/osd/osd_types.h | 1 - src/osdc/Objecter.h | 9 ++------- 5 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 28be8dd3274f5..d3308a4d9c4fb 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -5801,7 +5801,6 @@ int ReplicatedPG::fill_in_copy_get( // size, mtime reply_obj.size = oi.size; reply_obj.mtime = oi.mtime; - reply_obj.category = oi.category; if (soid.snap < CEPH_NOSNAP) { reply_obj.snaps = oi.snaps; } else { @@ -5975,7 +5974,6 @@ void ReplicatedPG::_copy_some(ObjectContextRef obc, CopyOpRef cop) } op.copy_get(&cop->cursor, get_copy_chunk_size(), &cop->results.object_size, &cop->results.mtime, - &cop->results.category, &cop->attrs, &cop->data, &cop->omap_header, &cop->omap, &cop->results.snaps, &cop->results.snap_seq, &cop->rval); @@ -6345,7 +6343,6 @@ void ReplicatedPG::finish_promote(int r, OpRequestRef op, tctx->discard_temp_oid = results->temp_oid; } tctx->new_obs.oi.size = results->object_size; - tctx->new_obs.oi.category = results->category; tctx->new_obs.oi.user_version = results->user_version; if (soid.snap != CEPH_NOSNAP) { diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index 37dc4ef40b619..3d57058cf8844 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -115,7 +115,6 @@ public: * other accesses to the object (in order to complete the copy). */ PGBackend::PGTransaction *final_tx; - string category; ///< The copy source's category version_t user_version; ///< The copy source's user version bool should_requeue; ///< op should be requeued on cancel vector snaps; ///< src's snaps (if clone) diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index 9485af651e314..3b98606da405b 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -3292,7 +3292,7 @@ void object_copy_data_t::encode(bufferlist& bl) const ENCODE_START(3, 1, bl); ::encode(size, bl); ::encode(mtime, bl); - ::encode(category, bl); + ::encode((__u32)0, bl); // was category; no longer used ::encode(attrs, bl); ::encode(data, bl); ::encode(omap, bl); @@ -3308,7 +3308,10 @@ void object_copy_data_t::decode(bufferlist::iterator& bl) DECODE_START(2, bl); ::decode(size, bl); ::decode(mtime, bl); - ::decode(category, bl); + { + string category; + ::decode(category, bl); // no longer used + } ::decode(attrs, bl); ::decode(data, bl); ::decode(omap, bl); diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index d523bd1ab461d..6f2c5a3891d5f 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -2489,7 +2489,6 @@ struct object_copy_data_t { bufferlist data; bufferlist omap_header; map omap; - string category; /// which snaps we are defined for (if a snap and not the head) vector snaps; diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index 30581767c35f0..c436bf23686d8 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -624,7 +624,6 @@ struct ObjectOperation { object_copy_cursor_t *cursor; uint64_t *out_size; utime_t *out_mtime; - string *out_category; std::map *out_attrs; bufferlist *out_data, *out_omap_header; std::map *out_omap; @@ -634,7 +633,6 @@ struct ObjectOperation { C_ObjectOperation_copyget(object_copy_cursor_t *c, uint64_t *s, utime_t *m, - string *cat, std::map *a, bufferlist *d, bufferlist *oh, std::map *o, @@ -642,7 +640,7 @@ struct ObjectOperation { snapid_t *osnap_seq, int *r) : cursor(c), - out_size(s), out_mtime(m), out_category(cat), + out_size(s), out_mtime(m), out_attrs(a), out_data(d), out_omap_header(oh), out_omap(o), out_snaps(osnaps), out_snap_seq(osnap_seq), prval(r) {} @@ -657,8 +655,6 @@ struct ObjectOperation { *out_size = copy_reply.size; if (out_mtime) *out_mtime = copy_reply.mtime; - if (out_category) - *out_category = copy_reply.category; if (out_attrs) *out_attrs = copy_reply.attrs; if (out_data) @@ -683,7 +679,6 @@ struct ObjectOperation { uint64_t max, uint64_t *out_size, utime_t *out_mtime, - string *out_category, std::map *out_attrs, bufferlist *out_data, bufferlist *out_omap_header, @@ -698,7 +693,7 @@ struct ObjectOperation { unsigned p = ops.size() - 1; out_rval[p] = prval; C_ObjectOperation_copyget *h = - new C_ObjectOperation_copyget(cursor, out_size, out_mtime, out_category, + new C_ObjectOperation_copyget(cursor, out_size, out_mtime, out_attrs, out_data, out_omap_header, out_omap, out_snaps, out_snap_seq, prval); out_bl[p] = &h->bl; -- 2.39.5