]> sourceware.org Git - lvm2.git/commitdiff
preload: preserve flushing state
authorZdenek Kabelac <zkabelac@redhat.com>
Wed, 6 Apr 2016 08:29:57 +0000 (10:29 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Wed, 6 Apr 2016 09:31:02 +0000 (11:31 +0200)
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

index 994ba809d25bf362f9ae764841aacb01bbeee206..b3e97db55f510ab1548b7c6877e4a9e6ac3091e3 100644 (file)
@@ -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;
 
This page took 0.044529 seconds and 5 git commands to generate.