diff options
author | Samuel Just <sam.just@inktank.com> | 2014-02-20 00:50:16 +0100 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2014-02-20 02:31:37 +0100 |
commit | 4441792710e2ee28620e40b66e525ed201927b48 (patch) | |
tree | 296ea221c75bdbca7694316a0d189db971ddd51b /src/osd/ECBackend.cc | |
parent | ReplicatedPG: ensure that ec appends are aligned (diff) | |
download | ceph-4441792710e2ee28620e40b66e525ed201927b48.tar.xz ceph-4441792710e2ee28620e40b66e525ed201927b48.zip |
ECBackend: handle short reads
async reads may have a length past the end of the object.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Diffstat (limited to 'src/osd/ECBackend.cc')
-rw-r--r-- | src/osd/ECBackend.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc index d430ea7d87b..3a92c45eefa 100644 --- a/src/osd/ECBackend.cc +++ b/src/osd/ECBackend.cc @@ -1536,7 +1536,7 @@ struct CallClientContexts : i->second.first->substr_of( bl, i->first.first - adjusted.first, - i->first.second); + MIN(i->first.second, bl.length() - (i->first.first - adjusted.first))); if (i->second.second) { i->second.second->complete(i->second.first->length()); } |