]> 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:34:27 +0000 (12:34 +0100)
commita94f5781d93f591a150f54c92a3d83a2f80bdf20
treed6517d0cd1d7f89831a35f5f0bb74e2e3c9cc441
parent482ace9617184ad72567220616132e544bafdfe5
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