Actions
Bug #14229
closedMemStore: need a guard when read the entire object
Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:
0%
Source:
Community (dev)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
int MemStore::read(
coll_t cid,
const ghobject_t& oid,
uint64_t offset,
size_t len,
bufferlist& bl,
uint32_t op_flags,
bool allow_eio)
{
dout(10) << __func__ << " " << cid << " " << oid << " "
<< offset << "~" << len << dendl;
CollectionRef c = get_collection(cid);
if (!c)
return -ENOENT;
ObjectRef o = c->get_object(oid);
if (!o)
return -ENOENT;
if (offset >= o->get_size())
return 0;
size_t l = len;
if (l == 0) // note: len == 0 means read the entire object
// also need a guard here
l = o->get_size();
Actions