]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
blk/KernelDevice: Unify discard thread management 58409/head
authorJoshua Baergen <jbaergen@digitalocean.com>
Mon, 15 Jul 2024 13:53:43 +0000 (07:53 -0600)
committerJoshua Baergen <jbaergen@digitalocean.com>
Mon, 15 Jul 2024 14:47:39 +0000 (08:47 -0600)
commit617c9364bc287f01929c66e8f264ff313cedcfca
tree13a0983a899cc826871c70af00dc53b866874c92
parent3d4a899d6c5f0c3c4c663d5d6dbb78285fbd7672
blk/KernelDevice: Unify discard thread management

Instead of having _discard_start() and _discard_stop() partially or
completely duplicate functionality in handle_conf_change(), have a
single _discard_update_threads() that can handle all three. Loops are
tidied slightly, the unnecessary target_discard_threads class variable
has been removed, and now handle_conf_change() will respect
support_discard.

Signed-off-by: Joshua Baergen <jbaergen@digitalocean.com>
src/blk/kernel/KernelDevice.cc
src/blk/kernel/KernelDevice.h