Skip to content

Commit

Permalink
Merge pull request #19464 from myoungwon/wip-bug-fix-22369
Browse files Browse the repository at this point in the history
osd: fix unordered read bug (for chunked object)

Reviewed-by: Sage Weil <sage@redhat.com>
  • Loading branch information
myoungwon committed Dec 16, 2017
2 parents 634a2cc + a250483 commit 9d2456f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
1 change: 0 additions & 1 deletion qa/suites/rados/thrash/workloads/set-chunks.yaml
Expand Up @@ -6,4 +6,3 @@ tasks:
set_chunk: true
op_weights:
chunk_read: 100
write: 30
3 changes: 3 additions & 0 deletions src/osd/PrimaryLogPG.cc
Expand Up @@ -3215,6 +3215,9 @@ bool PrimaryLogPG::can_proxy_chunked_read(OpRequestRef op, ObjectContextRef obc)
/* requested chunks exist in chunk_map ? */
for (auto &p : obc->obs.oi.manifest.chunk_map) {
if (p.first <= cursor && p.first + p.second.length > cursor) {
if (p.second.flags != chunk_info_t::FLAG_MISSING) {
return false;
}
if (p.second.length >= remain) {
remain = 0;
break;
Expand Down
16 changes: 0 additions & 16 deletions src/test/osd/RadosModel.h
Expand Up @@ -2246,22 +2246,6 @@ class SetChunkOp : public TestOp {
context->oid_in_use.insert(oid);
context->oid_not_in_use.erase(oid);

context->find_object(oid, &src_value);

comp = context->rados.aio_create_completion();
rd_op.stat(NULL, NULL, NULL);
context->io_ctx.aio_operate(context->prefix+oid, comp, &rd_op,
librados::OPERATION_ORDER_READS_WRITES,
NULL);
comp->wait_for_safe();
if ((r = comp->get_return_value()) && !src_value.deleted()) {
cerr << "Error: oid " << oid << " stat returned error code "
<< r << std::endl;
ceph_abort();
}
context->update_object_version(oid, comp->get_version64());
comp->release();

context->find_object(oid, &src_value);
context->find_object(oid_tgt, &tgt_value);

Expand Down

0 comments on commit 9d2456f

Please sign in to comment.