mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
osdc/ObjectCacher: set complete flag when we observe ENOENT
If we observe an ENOENT on a read, set the complete flag. Any dirty buffers we have will still be in memory, even if the write are in flight, because the TX state remains pinned until the writes commit. Writes cannot proceed faster than reads, even though reads may proceed faster than writes. Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
94d2b91d5b
commit
b9b1be6d68
@ -562,6 +562,11 @@ void ObjectCacher::bh_read_finish(int64_t poolid, sobject_t oid, loff_t start,
|
||||
} else {
|
||||
Object *ob = objects[poolid][oid];
|
||||
|
||||
if (r == -ENOENT && !ob->complete) {
|
||||
ldout(cct, 7) << "bh_read_finish ENOENT, marking complete on " << *ob << dendl;
|
||||
ob->complete = true;
|
||||
}
|
||||
|
||||
// apply to bh's!
|
||||
loff_t opos = start;
|
||||
while (true) {
|
||||
|
Loading…
Reference in New Issue
Block a user