Commit 907e53a
committed
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 c7f71d1 ("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 <[email protected]>1 parent 1606e7f commit 907e53a
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
236 | 239 | | |
237 | 240 | | |
238 | 241 | | |
| |||
261 | 264 | | |
262 | 265 | | |
263 | 266 | | |
264 | | - | |
265 | | - | |
266 | 267 | | |
267 | 268 | | |
268 | 269 | | |
| |||
0 commit comments