~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to src/messages/MOSDSubOp.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-07-16 09:56:24 UTC
  • mfrom: (0.3.11)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: package-import@ubuntu.com-20120716095624-azr2w4hbhei1rxmx
Tags: upstream-0.48
ImportĀ upstreamĀ versionĀ 0.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
class MOSDSubOp : public Message {
27
27
 
28
 
  static const int HEAD_VERSION = 6;
 
28
  static const int HEAD_VERSION = 7;
29
29
  static const int COMPAT_VERSION = 1;
30
30
 
31
31
public:
83
83
  map<string,bufferlist> omap_entries;
84
84
  bufferlist omap_header;
85
85
 
 
86
  // indicates that we must fix hobject_t encoding
 
87
  bool hobject_incorrect_pool;
 
88
 
86
89
  virtual void decode_payload() {
 
90
    hobject_incorrect_pool = false;
87
91
    bufferlist::iterator p = payload.begin();
88
92
    ::decode(map_epoch, p);
89
93
    ::decode(reqid, p);
125
129
      ::decode(oloc, p);
126
130
    if (header.version >= 4) {
127
131
      ::decode(data_included, p);
128
 
      ::decode(recovery_info, p);
 
132
      recovery_info.decode(p, pgid.pool());
129
133
      ::decode(recovery_progress, p);
130
134
      ::decode(current_progress, p);
131
135
    }
133
137
      ::decode(omap_entries, p);
134
138
    if (header.version >= 6)
135
139
      ::decode(omap_header, p);
 
140
 
 
141
    if (header.version < 7) {
 
142
      // Handle hobject_t format change
 
143
      if (poid.pool == -1)
 
144
        poid.pool = pgid.pool();
 
145
      hobject_incorrect_pool = true;
 
146
    }
136
147
  }
137
148
 
138
149
  virtual void encode_payload(uint64_t features) {
192
203
      noop(noop_),   
193
204
      old_exists(false), old_size(0),
194
205
      version(v),
195
 
      first(false), complete(false) {
 
206
      first(false), complete(false),
 
207
      hobject_incorrect_pool(false) {
196
208
    memset(&peer_stat, 0, sizeof(peer_stat));
197
209
    set_tid(rtid);
198
210
  }