Actions
Bug #7952
closedAfter aio_read() completes a call to return_value() doesn't return bytes read
Status:
Resolved
Priority:
Low
Assignee:
David Zafman
Category:
-
Target version:
-
% Done:
0%
Source:
other
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
When using the rados_aio_read() interface the c.bl bufferlist stores the read data. So the code below will set rval = c.bl.length(). The aio_read() gets a user bufferlist passed in, so return_value() returns 0 on success. This is just a confusing behavior which should be consistent between rados_return_value() and ctx.return_value().
void librados::IoCtxImpl::C_aio_Ack::finish(int r) { c->lock.Lock(); c->rval = r; c->ack = true; if (c->is_read) c->safe = true; c->cond.Signal(); if (c->bl.length() > 0) { c->rval = c->bl.length(); } if (c->callback_complete) { c->io->client->finisher.queue(new C_AioComplete(c)); } if (c->is_read && c->callback_safe) { c->io->client->finisher.queue(new C_AioSafe(c)); } c->put_unlock(); }
Updated by David Zafman about 10 years ago
- Status changed from New to Resolved
- Assignee set to David Zafman
d99f1d9f68db41231e0ffff4082b05d6d095c231
I forgot about this bug report, so it wasn't specified in the commit comment.
Actions