]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: cast `whoami` to unsigned so it can be used as the seed for RNG 24659/head
authorKefu Chai <kchai@redhat.com>
Thu, 18 Oct 2018 10:29:49 +0000 (18:29 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 18 Oct 2018 10:29:50 +0000 (18:29 +0800)
commit3fdb72b30370b0a2588900787f3191d21e4e61c8
tree49c0f6b798eab4e157df5656ff7737d1ade4943c
parent1cde6d651cd1c1a798fbf02b69576158ed3d5c96
osd: cast `whoami` to unsigned so it can be used as the seed for RNG

default_random_engine's result_type is `unsigned int`, so we need to
pass an `unsigned int` as its seed.

Fixes: http://tracker.ceph.com/issues/26890
Signed-off-by: Kefu Chai <kchai@redhat.com>
Conflicts:
src/osd/OSD.cc: this breaks the build with clang. and in master
we are not using std::default_random_engine for setting the scrub
interval. so this change is not cherry-picked from master.
src/osd/OSD.cc