]> 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>
Tue, 6 Aug 2024 10:59:13 +0000 (18:59 +0800)
commit65ec525ca2b13cd3e709fd95606d341c96aaa34e
treef615417c0d2ca3b4d0b2043cd3d8fea1326ef55d
parent29fb6e53eeff3f14fed9b8c4c198c3aa7802d288
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