The current implementation for chunked object only supports
proxy_read(if offset is within range) and write(local write)
In this case, a read request can be handled before a write request.
This commit prevents unordered read processing because
proxy_read() will be executed if the chunk is missing state.
If chunked object has been overwritten, its state will not be missing.
Fixes: http://tracker.ceph.com/issues/22369
Signed-off-by: Myoungwon Oh <omwmw@sk.com>
/* 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;