ReplicatedPG: copy: don't return from finish_copyfrom

The return value is meaningless; nothing in this function can fail.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Greg Farnum 2013-10-09 17:53:35 -07:00 committed by Sage Weil
parent 325aae3652
commit 0699fc5c36
2 changed files with 4 additions and 5 deletions

View File

@ -3713,7 +3713,8 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
} else {
// finish
assert(ctx->copy_cb->get_result() >= 0);
result = finish_copyfrom(ctx);
finish_copyfrom(ctx);
result = 0;
}
}
break;
@ -4544,7 +4545,7 @@ void ReplicatedPG::_build_finish_copy_transaction(CopyOpRef cop,
}
}
int ReplicatedPG::finish_copyfrom(OpContext *ctx)
void ReplicatedPG::finish_copyfrom(OpContext *ctx)
{
dout(20) << "finish_copyfrom on " << ctx->obs->oi.soid << dendl;
ObjectState& obs = ctx->new_obs;
@ -4572,8 +4573,6 @@ int ReplicatedPG::finish_copyfrom(OpContext *ctx)
}
ctx->delta_stats.num_wr++;
ctx->delta_stats.num_wr_kb += SHIFT_ROUND_UP(obs.oi.size, 10);
return 0;
}
void ReplicatedPG::cancel_copy(CopyOpRef cop, bool requeue)

View File

@ -953,7 +953,7 @@ protected:
void _copy_some(ObjectContextRef obc, CopyOpRef cop);
void _build_finish_copy_transaction(CopyOpRef cop,
ObjectStore::Transaction& t);
int finish_copyfrom(OpContext *ctx);
void finish_copyfrom(OpContext *ctx);
void cancel_copy(CopyOpRef cop, bool requeue);
void cancel_copy_ops(bool requeue);