summaryrefslogtreecommitdiffstats
path: root/src/messages/MOSDSubOp.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-07-20 21:30:53 +0200
committerSage Weil <sage@newdream.net>2010-07-20 21:30:53 +0200
commit462476404d1728122c4e44c1ed7a5ffa267b50b2 (patch)
tree82b7c56bc6adf4ab80b3652b2b082d3845df5d35 /src/messages/MOSDSubOp.h
parentosd: refactor push code (diff)
downloadceph-462476404d1728122c4e44c1ed7a5ffa267b50b2.tar.xz
ceph-462476404d1728122c4e44c1ed7a5ffa267b50b2.zip
osd: push in chunks
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'src/messages/MOSDSubOp.h')
-rw-r--r--src/messages/MOSDSubOp.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/messages/MOSDSubOp.h b/src/messages/MOSDSubOp.h
index e4aecf8b114..aacd023857b 100644
--- a/src/messages/MOSDSubOp.h
+++ b/src/messages/MOSDSubOp.h
@@ -64,7 +64,9 @@ public:
interval_set<uint64_t> data_subset;
map<sobject_t, interval_set<uint64_t> > clone_subsets;
- virtual void decode_payload() {
+ bool first, complete;
+
+ virtual void decode_payload() {
bufferlist::iterator p = payload.begin();
::decode(map_epoch, p);
::decode(reqid, p);
@@ -96,9 +98,16 @@ public:
::decode(attrset, p);
::decode(data_subset, p);
::decode(clone_subsets, p);
+
+ if (header.version >= 2) {
+ ::decode(first, p);
+ ::decode(complete, p);
+ }
}
virtual void encode_payload() {
+ header.version = 2;
+
::encode(map_epoch, payload);
::encode(reqid, payload);
::encode(pgid, payload);
@@ -131,6 +140,8 @@ public:
header.data_off = ops[0].op.extent.offset;
else
header.data_off = 0;
+ ::encode(first, payload);
+ ::encode(complete, payload);
}
@@ -144,7 +155,8 @@ public:
acks_wanted(aw),
noop(noop_),
old_exists(false), old_size(0),
- version(v)
+ version(v),
+ first(false), complete(false)
{
memset(&peer_stat, 0, sizeof(peer_stat));
set_tid(rtid);
@@ -162,6 +174,10 @@ public:
<< " " << ops;
if (noop)
out << " (NOOP)";
+ if (first)
+ out << " first";
+ if (complete)
+ out << " complete";
out << " v " << version
<< " snapset=" << snapset << " snapc=" << snapc;
if (!data_subset.empty()) out << " subset " << data_subset;