Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osd/PrimaryLogPG: remove duplicated code. #13894

Merged
merged 1 commit into from Mar 13, 2017

Conversation

majianpeng
Copy link
Member

In fact, the following code in this function

if (op->may_write()) {
....
// invalid?
if (m->get_snapid() != CEPH_NOSNAP) {
dout(20) << func << ": write to clone not valid " << *m << dendl;
osd->reply_op_error(op, -EINVAL);
return;
}
has the same function. So remove the duplicated code.

Signed-off-by: Jianpeng Ma jianpeng.ma@intel.com

Copy link
Member

@gregsfortytwo gregsfortytwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-By: Greg Farnum gfarnum@redhat.com

In fact, the following code in this function
>> if (op->may_write()) {
>>  ....
>>    // invalid?
>>    if (m->get_snapid() != CEPH_NOSNAP) {
>>      dout(20) << __func__ << ": write to clone not valid " << *m << dendl;
>>      osd->reply_op_error(op, -EINVAL);
>>      return;
>>    }
has the same function. So remove the duplicated code.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
@majianpeng majianpeng deleted the do_op_duplicated_code branch March 14, 2017 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants