]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crush: encode can override weights with weight set 15002/head
authorLoic Dachary <ldachary@redhat.com>
Mon, 8 May 2017 16:57:23 +0000 (18:57 +0200)
committerLoic Dachary <ldachary@redhat.com>
Fri, 12 May 2017 15:17:35 +0000 (17:17 +0200)
commit7114581aaa057b1ccba21d96f30166f536275222
treec380930ab5b021a4ce9e9e50931430fe9ecb7885
parent3099684cf6ebea6c1e3fdad3988c90c8f37341db
crush: encode can override weights with weight set

Encode a "legacy" crushmap if (1) we're using weight sets, (2) the
client is lacking features for the weight set, but (3) the weight set
has a single position and no id remapping. Since these maps are only
used by clients (not humans), then there is no need to preserve the
original crush weights. We can just swap them for the real weights and
the legacy clients will behave as expected.

Fixes: http://tracker.ceph.com/issues/19836
Signed-off-by: Loic Dachary <loic@dachary.org>
src/crush/CrushWrapper.cc
src/test/crush/CrushWrapper.cc