osd: set PULL subop cost to size of requested data

Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2013-01-21 13:57:59 -08:00
parent e8e0da1a57
commit a1bf8220e5

View File

@ -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();