From: Radoslaw Zarzynski Date: Sat, 6 Oct 2018 13:54:24 +0000 (+0200) Subject: osd: kill request_redirect_t::osd_instructions entirely. X-Git-Tag: v14.1.0~921^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=24c6609b1de68292afaafd91f9e765366a22f4c5;p=ceph.git osd: kill request_redirect_t::osd_instructions entirely. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index 3fdc2dc32214..70c3273b08ec 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -248,16 +248,21 @@ void request_redirect_t::encode(bufferlist& bl) const ENCODE_START(1, 1, bl); encode(redirect_locator, bl); encode(redirect_object, bl); - encode(osd_instructions, bl); + // legacy of the removed osd_instructions member + encode((uint32_t)0, bl); ENCODE_FINISH(bl); } void request_redirect_t::decode(bufferlist::const_iterator& bl) { DECODE_START(1, bl); + uint32_t legacy_osd_instructions_len; decode(redirect_locator, bl); decode(redirect_object, bl); - decode(osd_instructions, bl); + decode(legacy_osd_instructions_len, bl); + if (legacy_osd_instructions_len) { + bl.advance(legacy_osd_instructions_len); + } DECODE_FINISH(bl); } diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index b7a2e889c94d..5d36df4ffb19 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -289,7 +289,6 @@ struct request_redirect_t { private: object_locator_t redirect_locator; ///< this is authoritative string redirect_object; ///< If non-empty, the request goes to this object name - bufferlist osd_instructions; ///< a bufferlist for the OSDs, passed but not interpreted by clients friend ostream& operator<<(ostream& out, const request_redirect_t& redir); public: @@ -303,8 +302,6 @@ public: const string& robj) : redirect_locator(orig), redirect_object(robj) {} - const bufferlist& get_instructions() { return osd_instructions; } - bool empty() const { return redirect_locator.empty() && redirect_object.empty(); }