From 844b00958492224c448b30f89ae5532bb6591fd2 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sun, 25 Oct 2015 20:37:39 +0100 Subject: [PATCH] dev_manager: enabled no_flush for suspend While the activation code tries to evaluate which target really needs flush with suspend and which may go without flush, it has stayed effectively disabled by original commit: 33f732c5e9493cda4b161a18b3d53885d207e3b8 since here it only allows to pass non-pvmoving 'mirrors'. So remove check for mirror LV type and only disable no_flush for 'pvmove'.. TODO: Looking into history - it also seemed like raid target would have always required flushing but it's been later removed without clean explanation. If some more targets really do need 'no_flush' it should been handle at their 'level' - since we now stack multiple targets over itself. --- WHATS_NEW | 1 + lib/activate/dev_manager.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index 8ca0aa7f5..33d11a46d 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.133 - ====================================== + Enable code which detects the need of flush during suspend. Ensure --use-policy will resize volume to fit below threshold. Correct percentage evaluation when checking thin-pool over threshold. Fix lvmcache to move PV from VG to orphans if VG is removed and lvmetad used. diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index a5ee824fb..1caa2d77a 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -3277,7 +3277,7 @@ static int _tree_action(struct dev_manager *dm, const struct logical_volume *lv, break; case SUSPEND: dm_tree_skip_lockfs(root); - if (!dm->flush_required && lv_is_mirror(lv) && !lv_is_pvmove(lv)) + if (!dm->flush_required && !lv_is_pvmove(lv)) dm_tree_use_no_flush_suspend(root); /* Fall through */ case SUSPEND_WITH_LOCKFS: