]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
test/librbd: avoid config-related crashes in DiscardWithPruneWriteOverlap
authorIlya Dryomov <idryomov@gmail.com>
Sat, 9 Dec 2023 20:00:42 +0000 (21:00 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 11 Dec 2023 11:31:53 +0000 (12:31 +0100)
commita95496ab1af01e16f56aa95776f67478f4d36e18
tree4ca6891ae3861ac9c65e6bec8587adcfe3504f05
parenteeb62d80eff9364a3182a21970850ffe8bb50abc
test/librbd: avoid config-related crashes in DiscardWithPruneWriteOverlap

For reasons that I think no longer apply today, set_val() and
set_val_or_die() refuse to set "type: str" config options that aren't
marked as "can be changed at runtime" -- set_val() returns an error and
set_val_or_die() terminates the process.  What is and isn't marked as
"can be changed at runtime" seems to be pretty much random both within
and outside of RBD, so let's just refactor how config is set here.

While at it, I realized that reproducer config is underspecified:

- for rbd_cache_policy and rbd_cache_writethrough_until_flush settings
  to matter, rbd_cache must be set to true and rbd_cache_max_dirty must
  be set to a positive number

- order should be set explicitly, because rbd_default_order can be as
  low as 12 (for 4096-byte objects), interfering with the logic of the
  test

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit de397f7588897fb0a3f15dcddf660c8e569b1e4e)
src/test/librbd/journal/test_Stress.cc