summaryrefslogtreecommitdiffstats
path: root/src/osd/ECBackend.cc
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2014-02-20 00:50:16 +0100
committerSamuel Just <sam.just@inktank.com>2014-02-20 02:31:37 +0100
commit4441792710e2ee28620e40b66e525ed201927b48 (patch)
tree296ea221c75bdbca7694316a0d189db971ddd51b /src/osd/ECBackend.cc
parentReplicatedPG: ensure that ec appends are aligned (diff)
downloadceph-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.cc2
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());
}