Skip to content

dm cache policy smq: ensure IO doesn't prevent cleaner policy progress

Benjamin Marzinski requested to merge bmarzins/centos-stream-9:bz2159623 into main

Bugzilla: https://bugzilla.redhat.com/2159623
Tested: lvm2-testsuite and dmtest-python
Upstream Status: kernel/git/torvalds/linux.git

commit 1e4ab7b4c881cf26c1c72b3f56519e03475486fb
Author: Joe Thornber ejt@redhat.com
Date: Tue Jul 25 11:44:41 2023 -0400

dm cache policy smq: ensure IO doesn't prevent cleaner policy progress  

When using the cleaner policy to decommission the cache, there is  
never any writeback started from the cache as it is constantly delayed  
due to normal I/O keeping the device busy. Meaning @idle=false was  
always being passed to clean_target_met()  

Fix this by adding a specific 'cleaner' flag that is set when the  
cleaner policy is configured. This flag serves to always allow the  
cleaner's writeback work to be queued until the cache is  
decommissioned (even if the cache isn't idle).  

Reported-by: David Jeffery <djeffery@redhat.com>  
Fixes: b29d4986d0da ("dm cache: significant rework to leverage dm-bio-prison-v2")  
Cc: stable@vger.kernel.org  
Signed-off-by: Joe Thornber <ejt@redhat.com>  
Signed-off-by: Mike Snitzer <snitzer@kernel.org>  

Signed-off-by: Benjamin Marzinski bmarzins@redhat.com

Edited by Benjamin Marzinski

Merge request reports