Skip to content

Commit

Permalink
crush: decode and initialize chooseleaf_vary_r
Browse files Browse the repository at this point in the history
Commit e2b149c ("crush: add chooseleaf_vary_r tunable") added the
crush_map::chooseleaf_vary_r field but missed the decode part.  This
lead to misdirected requests caused by incorrect raw crush mapping
sets.

Fixes: http://tracker.ceph.com/issues/8226

Reported-and-Tested-by: Dmitry Smirnov <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
Reviewed-by: Sage Weil <[email protected]>
  • Loading branch information
idryomov committed May 16, 2014
1 parent 178eda2 commit f140662
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/ceph/osdmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,11 @@ static struct crush_map *crush_decode(void *pbyval, void *end)
dout("crush decode tunable chooseleaf_descend_once = %d",
c->chooseleaf_descend_once);

ceph_decode_need(p, end, sizeof(u8), done);
c->chooseleaf_vary_r = ceph_decode_8(p);
dout("crush decode tunable chooseleaf_vary_r = %d",
c->chooseleaf_vary_r);

done:
dout("crush_decode success\n");
return c;
Expand Down

0 comments on commit f140662

Please sign in to comment.