]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: remove peer_stat from MOSDOp entirely
authorSage Weil <sage@newdream.net>
Mon, 13 Feb 2012 19:06:34 +0000 (11:06 -0800)
committerSage Weil <sage@newdream.net>
Mon, 13 Feb 2012 19:06:34 +0000 (11:06 -0800)
We haven't used this feature for years and years, and don't plan to.  It
was there to facilitate "read shedding", where the primary OSD would
forward a read request to a replica.  However, replicas can't reply back
to the client in that case because OSDs don't initiate connections (they
used to).

Rip this out for now, especially since osd_peer_stat_t just changed.

Signed-off-by: Sage Weil <sage@newdream.net>
src/include/rados.h
src/messages/MOSDOp.h

index b7aa8d4b328799b3a8fd121876cb3c781f765587..f6f0b2190bd3400dbb39219176d8d66027c38bb2 100644 (file)
@@ -304,7 +304,7 @@ enum {
        CEPH_OSD_FLAG_READ =           0x0010,  /* op may read */
        CEPH_OSD_FLAG_WRITE =          0x0020,  /* op may write */
        CEPH_OSD_FLAG_ORDERSNAP =      0x0040,  /* EOLDSNAP if snapc is out of order */
-       CEPH_OSD_FLAG_PEERSTAT =       0x0080,  /* msg includes osd_peer_stat */
+       CEPH_OSD_FLAG_PEERSTAT_OLD =   0x0080,  /* DEPRECATED msg includes osd_peer_stat */
        CEPH_OSD_FLAG_BALANCE_READS =  0x0100,
        CEPH_OSD_FLAG_PARALLELEXEC =   0x0200,  /* execute op in parallel */
        CEPH_OSD_FLAG_PGOP =           0x0400,  /* pg op, no object */
index 418886507ffc8b054545c0f77bb3fca427ab918e..07928628b6f8280a49c41ab805ebcbd44e46401a 100644 (file)
@@ -54,7 +54,6 @@ private:
   snapid_t snap_seq;
   vector<snapid_t> snaps;
 
-  osd_peer_stat_t peer_stat;
 public:
   int rmw_flags;
 
@@ -99,15 +98,6 @@ public:
   bool may_exec() { assert(rmw_flags); return rmw_flags & (CEPH_OSD_FLAG_EXEC | CEPH_OSD_FLAG_EXEC_PUBLIC); }
   bool require_exec_caps() { assert(rmw_flags); return rmw_flags & CEPH_OSD_FLAG_EXEC; }
 
-  void set_peer_stat(const osd_peer_stat_t& st) {
-    peer_stat = st;
-    flags |= CEPH_OSD_FLAG_PEERSTAT;
-  }
-  const osd_peer_stat_t& get_peer_stat() {
-    assert(flags & CEPH_OSD_FLAG_PEERSTAT);
-    return peer_stat; 
-  }
-
   MOSDOp()
     : Message(CEPH_MSG_OSD_OP, HEAD_VERSION, COMPAT_VERSION) { }
   MOSDOp(int inc, long tid,
@@ -249,8 +239,6 @@ struct ceph_osd_request_head {
 
       ::encode_nohead(oid.name, payload);
       ::encode_nohead(snaps, payload);
-      if (flags & CEPH_OSD_FLAG_PEERSTAT)
-       ::encode(peer_stat, payload);
     } else {
       ::encode(client_inc, payload);
       ::encode(osdmap_epoch, payload);
@@ -271,9 +259,6 @@ struct ceph_osd_request_head {
       ::encode(snap_seq, payload);
       ::encode(snaps, payload);
 
-      if (flags & CEPH_OSD_FLAG_PEERSTAT)
-       ::encode(peer_stat, payload);
-
       ::encode(retry_attempt, payload);
     }
   }
@@ -315,9 +300,6 @@ struct ceph_osd_request_head {
       decode_nohead(oid_len, oid.name, p);
       decode_nohead(num_snaps, snaps, p);
 
-      if (flags & CEPH_OSD_FLAG_PEERSTAT)
-       ::decode(peer_stat, p);
-
       // recalculate pgid hash value
       pgid.set_ps(ceph_str_hash(CEPH_STR_HASH_RJENKINS,
                                oid.name.c_str(),
@@ -355,9 +337,6 @@ struct ceph_osd_request_head {
       ::decode(snap_seq, p);
       ::decode(snaps, p);
 
-      if (flags & CEPH_OSD_FLAG_PEERSTAT)
-       ::decode(peer_stat, p);
-
       if (header.version >= 4)
        ::decode(retry_attempt, p);
       else