]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd: "rbd bench" always writes the same byte 59423/head
authorIlya Dryomov <idryomov@gmail.com>
Fri, 23 Aug 2024 21:00:24 +0000 (23:00 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 23 Aug 2024 21:00:24 +0000 (23:00 +0200)
commit907e53aa8524971e3d969ec519953cdd3d83871f
tree394e0eb5f3831b882a329b765310029fb5e68368
parent1606e7f6687026ef9e2196416ed4d243749d4303
rbd: "rbd bench" always writes the same byte

It's expected that the buffer is filled with the same byte, but the
byte should differ from run to run:

    memset(bp.c_str(), rand() & 0xff, io_size);

This was broken in commit c7f71d14a5d3 ("rbd: migrated existing command
logic to new namespaces") which inadvertently moved the call to srand(),
leaving rand() unseeded for the above memset().

Fixes: https://tracker.ceph.com/issues/67698
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/tools/rbd/action/Bench.cc