summaryrefslogtreecommitdiff
path: root/src/messages
diff options
context:
space:
mode:
authorSamuel Just <samuel.just@dreamhost.com>2012-02-07 16:35:04 -0800
committerSamuel Just <samuel.just@dreamhost.com>2012-02-13 11:24:18 -0800
commit2476dd7127d710e6ff5f16797f48725888e6e398 (patch)
tree54c90ba38d48b6f621c701ec692a07c9ec9360c9 /src/messages
parentf80e0c715beb414ed4427fb54f2a7b781dadc4e9 (diff)
downloadceph-2476dd7127d710e6ff5f16797f48725888e6e398.tar.gz
MOSDSubOp: Add new object recovery state
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Diffstat (limited to 'src/messages')
-rw-r--r--src/messages/MOSDSubOp.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/messages/MOSDSubOp.h b/src/messages/MOSDSubOp.h
index fdf03e27eac..ed8a2ffc3ed 100644
--- a/src/messages/MOSDSubOp.h
+++ b/src/messages/MOSDSubOp.h
@@ -25,7 +25,7 @@
class MOSDSubOp : public Message {
- static const int HEAD_VERSION = 3;
+ static const int HEAD_VERSION = 4;
static const int COMPAT_VERSION = 1;
public:
@@ -71,6 +71,15 @@ public:
bool first, complete;
+ interval_set<uint64_t> data_included;
+ ObjectRecoveryInfo recovery_info;
+
+ // reflects result of current push
+ ObjectRecoveryProgress recovery_progress;
+
+ // reflects progress before current push
+ ObjectRecoveryProgress current_progress;
+
virtual void decode_payload() {
bufferlist::iterator p = payload.begin();
::decode(map_epoch, p);
@@ -101,6 +110,7 @@ public:
::decode(pg_trim_to, p);
::decode(peer_stat, p);
::decode(attrset, p);
+
::decode(data_subset, p);
::decode(clone_subsets, p);
@@ -110,6 +120,12 @@ public:
}
if (header.version >= 3)
::decode(oloc, p);
+ if (header.version >= 4) {
+ ::decode(data_included, p);
+ ::decode(recovery_info, p);
+ ::decode(recovery_progress, p);
+ ::decode(current_progress, p);
+ }
}
virtual void encode_payload(uint64_t features) {
@@ -148,9 +164,12 @@ public:
::encode(first, payload);
::encode(complete, payload);
::encode(oloc, payload);
+ ::encode(data_included, payload);
+ ::encode(recovery_info, payload);
+ ::encode(recovery_progress, payload);
+ ::encode(current_progress, payload);
}
-
MOSDSubOp()
: Message(MSG_OSD_SUBOP, HEAD_VERSION, COMPAT_VERSION) { }
MOSDSubOp(osd_reqid_t r, pg_t p, const hobject_t& po, bool noop_, int aw,