Message ID | 1399897059-4813-1-git-send-email-ilya.dryomov@inktank.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Reviewed-by: Sage Weil <sage@inktank.com> On Mon, 12 May 2014, Ilya Dryomov wrote: > Commit e2b149cc4ba0 ("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 <onlyjob@member.fsf.org> > Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> > --- > net/ceph/osdmap.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c > index 8b8a5a24b223..c547e46084d3 100644 > --- a/net/ceph/osdmap.c > +++ b/net/ceph/osdmap.c > @@ -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; > -- > 1.7.10.4 > > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c index 8b8a5a24b223..c547e46084d3 100644 --- a/net/ceph/osdmap.c +++ b/net/ceph/osdmap.c @@ -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;
Commit e2b149cc4ba0 ("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 <onlyjob@member.fsf.org> Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> --- net/ceph/osdmap.c | 5 +++++ 1 file changed, 5 insertions(+)