]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon/Session: only index osd ids >= 0 32908/head
authorSage Weil <sage@redhat.com>
Tue, 21 Jan 2020 21:09:01 +0000 (15:09 -0600)
committerNathan Cutler <ncutler@suse.com>
Mon, 27 Jan 2020 16:01:47 +0000 (17:01 +0100)
commit5b9a2b756ecf4d4968cde34807aafee0d3e5d6a3
treeb15e8295b231f9f5aedfd6140100552520d3d484
parent2ab5460062b6732d368caed445f975e4b7ef2331
mon/Session: only index osd ids >= 0

This ensures that get_random_osd_session behaves when it does

    int n = by_osd.rbegin()->first + 1;
    int r = rand() % n;

Fixes: https://tracker.ceph.com/issues/43552
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit d6f0642b82c5a1caa37b839bc8380aeb0c532143)

Conflicts:
src/mon/Session.h
src/mon/Session.h