]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
blk/KernelDevice: Unify discard thread management
authorJoshua Baergen <jbaergen@digitalocean.com>
Mon, 15 Jul 2024 13:53:43 +0000 (07:53 -0600)
committerYite Gu <yitegu0@gmail.com>
Wed, 7 Aug 2024 02:47:58 +0000 (10:47 +0800)
commitaa601fcdc213eda276b82dda16096656d37185e9
tree77dba0ab89a6f4d6c500f7730400ae8557446696
parent78a804ce8254d0dbfc6cef09d42b7ef528503ded
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>
(cherry picked from commit 617c9364bc287f01929c66e8f264ff313cedcfca)
src/blk/kernel/KernelDevice.cc
src/blk/kernel/KernelDevice.h