diff options
author | Sage Weil <sage@inktank.com> | 2013-01-21 13:57:59 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-01-22 14:47:40 -0800 |
commit | a1bf8220e545f29b83d965f07b1abfbea06238b3 (patch) | |
tree | 12d9c9fb4ce7c70a5471e604aa11d1fc2cd6fb63 | |
parent | e8e0da1a577e24cd4aad71fb94d8b244e2ac7300 (diff) | |
download | ceph-a1bf8220e545f29b83d965f07b1abfbea06238b3.tar.gz |
osd: set PULL subop cost to size of requested data
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/messages/MOSDSubOp.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/messages/MOSDSubOp.h b/src/messages/MOSDSubOp.h index e69042b121a..50b1a926957 100644 --- a/src/messages/MOSDSubOp.h +++ b/src/messages/MOSDSubOp.h @@ -86,6 +86,12 @@ public: // indicates that we must fix hobject_t encoding bool hobject_incorrect_pool; + int get_cost() const { + if (ops.size() == 1 && ops[0].op.op == CEPH_OSD_OP_PULL) + return ops[0].op.extent.length; + return data.length(); + } + virtual void decode_payload() { hobject_incorrect_pool = false; bufferlist::iterator p = payload.begin(); |