mirror of
https://github.com/ceph/ceph
synced 2024-12-17 17:05:42 +00:00
librbd: clarify handle_sparse_read condition
The earlier condition is >. != means < at this point, and the nesting is unnecessary. Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
This commit is contained in:
parent
2bdaba4f01
commit
e17b5a85be
@ -1701,11 +1701,9 @@ ssize_t handle_sparse_read(CephContext *cct,
|
||||
buf_ofs += gap;
|
||||
buf_left -= gap;
|
||||
block_ofs = extent_ofs;
|
||||
} else {
|
||||
if (extent_ofs != block_ofs) {
|
||||
assert(0 == "osd returned data prior to what we asked for");
|
||||
return -EIO;
|
||||
}
|
||||
} else if (extent_ofs < block_ofs) {
|
||||
assert(0 == "osd returned data prior to what we asked for");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if (bl_ofs + extent_len > (buf_ofs + buf_left)) {
|
||||
|
Loading…
Reference in New Issue
Block a user