osd/ECMsgTypes: fix ECSubRead compat decode

Populate subchunks based on to_read, not attrs_to_read.

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2018-03-16 17:47:55 -05:00
parent 9424ed8506
commit 4dcf010571

View File

@ -219,8 +219,8 @@ void ECSubRead::decode(bufferlist::iterator &bl)
if (struct_v > 2 && struct_v > struct_compat) {
decode(subchunks, bl);
} else {
for (auto &&i : attrs_to_read) {
subchunks[i].push_back(make_pair(0, 1));
for (auto &i : to_read) {
subchunks[i.first].push_back(make_pair(0, 1));
}
}
DECODE_FINISH(bl);