]> 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:23:33 +0000 (12:23 +0100)
commit600a545c57c1a897e8ddbe90bfed7a17910c6ee4
treeadc80d68714c44a6ba57244182b713426a61e6db
parent8efef4970d4ec3dbfc55c0e04f44222dad364916
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