Skip to content

Commit

Permalink
Merge pull request #7179 from dachary/wip-14287-hammer
Browse files Browse the repository at this point in the history
hammer: ReplicatedPG: wrong result code checking logic during sparse_read

Reviewed-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Jan 14, 2016
2 parents 28e99a9 + 1ab2b48 commit 4e67418
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/osd/ReplicatedPG.cc
Expand Up @@ -3575,6 +3575,11 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
data_bl.claim_append(tmpbl);
last = miter->first + r;
}

if (r < 0) {
result = r;
break;
}

// verify trailing hole?
if (cct->_conf->osd_verify_sparse_read_holes) {
Expand All @@ -3590,11 +3595,6 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
}
}

if (r < 0) {
result = r;
break;
}

op.extent.length = total_read;

::encode(m, osd_op.outdata);
Expand Down

0 comments on commit 4e67418

Please sign in to comment.