Skip to content

Commit

Permalink
Merge pull request #7179: hammer: ReplicatedPG: wrong result code che…
Browse files Browse the repository at this point in the history
…cking logic during sparse_read

Reviewed-by: Loic Dachary <ldachary@redhat.com>
  • Loading branch information
Loic Dachary committed Jan 11, 2016
2 parents 7791615 + 1ab2b48 commit 7acef2c
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 7acef2c

Please sign in to comment.