osd/ECMsgTypes: fix ECSubRead compat decode 20948/head
authorSage Weil <sage@redhat.com>
Fri, 16 Mar 2018 22:47:55 +0000 (17:47 -0500)
committerSage Weil <sage@redhat.com>
Sat, 17 Mar 2018 13:23:48 +0000 (08:23 -0500)
Populate subchunks based on to_read, not attrs_to_read.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/ECMsgTypes.cc

index 4c8e87934ad003c02279b903588e5fb05144c226..f97c452391a974ecf5ea80dffd164cb1a4ff52b8 100644 (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);