From 5b2227c2c10c2f762e238fedb756850fe4ac5d5d Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 6 Apr 2016 10:29:57 +0200 Subject: [PATCH] preload: preserve flushing state When leaving preload routine it should not altet state of flush required when it's been already set to 1 and drop it to 0. The API here is unclean, but current usage expects the same variable pointer is for all preload calls and combines 'flush_required' across all of them. --- lib/activate/dev_manager.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index 994ba809d..b3e97db55 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -3093,6 +3093,8 @@ int dev_manager_activate(struct dev_manager *dm, const struct logical_volume *lv int dev_manager_preload(struct dev_manager *dm, const struct logical_volume *lv, struct lv_activate_opts *laopts, int *flush_required) { + dm->flush_required = *flush_required; + if (!_tree_action(dm, lv, laopts, PRELOAD)) return_0;