]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
blk/KernelDevice: React to bdev_enable_discard changes in handle_conf_change()
authorJoshua Baergen <jbaergen@digitalocean.com>
Tue, 2 Jul 2024 18:10:31 +0000 (12:10 -0600)
committerYite Gu <yitegu0@gmail.com>
Wed, 7 Aug 2024 02:47:14 +0000 (10:47 +0800)
commitd58c5c861ab80583b6878e5bce759d64b1991561
treea1c2bd06bc89d1b254b713ba1b7242b787721a6c
parentc3dc1c4f1b3d048fd3409b0bbc69ee81638298be
blk/KernelDevice: React to bdev_enable_discard changes in handle_conf_change()

This fixes two issues that were introduced by 755f3e03b5bf547cfd940b52a53833f66285062b:
1. After an OSD boots, discard threads were not stopped when
   bdev_enable_discard was set to false, whereas that was the intent of
   that commit.
2. If bdev_enable_discard or bdev_async_discard_threads are configured
   with a mask that can't be evaluated at OSD boot (e.g. a device
   class), then async discard won't be enabled until a later config
   change to bdev_async_discard_threads.

Fixes: https://tracker.ceph.com/issues/66817
Signed-off-by: Joshua Baergen <jbaergen@digitalocean.com>
(cherry picked from commit 8ffe35e85f2e1d10fa8b238d54bbf89e3862830c)
src/blk/kernel/KernelDevice.cc