1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

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:
33f732c5e9 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.
This commit is contained in:
Zdenek Kabelac 2015-10-25 20:37:39 +01:00
parent 9ef820a2a5
commit 844b009584
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.133 - Version 2.02.133 -
====================================== ======================================
Enable code which detects the need of flush during suspend.
Ensure --use-policy will resize volume to fit below threshold. Ensure --use-policy will resize volume to fit below threshold.
Correct percentage evaluation when checking thin-pool over 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. Fix lvmcache to move PV from VG to orphans if VG is removed and lvmetad used.

View File

@ -3277,7 +3277,7 @@ static int _tree_action(struct dev_manager *dm, const struct logical_volume *lv,
break; break;
case SUSPEND: case SUSPEND:
dm_tree_skip_lockfs(root); 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); dm_tree_use_no_flush_suspend(root);
/* Fall through */ /* Fall through */
case SUSPEND_WITH_LOCKFS: case SUSPEND_WITH_LOCKFS: