]> sourceware.org Git - lvm2.git/commitdiff
lib: pass mem pool to check_transient_status
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 30 Nov 2015 20:24:31 +0000 (21:24 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Tue, 1 Dec 2015 12:01:28 +0000 (13:01 +0100)
check_transient_status() may need to allocate some memory,
so pass in already existing mem pool.

WHATS_NEW
lib/activate/dev_manager.c
lib/metadata/segtype.h
lib/mirror/mirrored.c

index d2bdb5874ea4e79d369ea96b3c355ed085bc4e1b..dcd2b22f8f88e137b9eb7d273daa6109d9a5bb34 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.137 -
 =====================================
+  Add mem pool arg for check_transient_status() target function.
   Avoid misleading error with -m is omitted with lvconvert to raid types.
 
 Version 2.02.136 - 28th November 2015
index 4b378452ddb782863f39baaf24dad91e43c17692..4eff5cb7425e21a6d2c1af8007d2eef55163da45 100644 (file)
@@ -1114,7 +1114,7 @@ int dev_manager_transient(struct dev_manager *dm, const struct logical_volume *l
                }
 
                if (seg->segtype->ops->check_transient_status &&
-                   !seg->segtype->ops->check_transient_status(seg, params))
+                   !seg->segtype->ops->check_transient_status(dm->mem, seg, params))
                        goto_out;
 
        } while (next);
index 72c64f9b77b74d466065f50b6be67e84fb5d038d..41adf924a4bae613c39039e896322cb06183dd03 100644 (file)
@@ -192,7 +192,8 @@ struct segtype_handler {
                                struct dm_tree_node *node, uint64_t len,
                                uint32_t *pvmove_mirror_count);
        int (*target_status_compatible) (const char *type);
-       int (*check_transient_status) (struct lv_segment *seg, char *params);
+       int (*check_transient_status) (struct dm_pool *mem,
+                                      struct lv_segment *seg, char *params);
        int (*target_percent) (void **target_state,
                               dm_percent_t *percent,
                               struct dm_pool * mem,
index 6e189b2fbb363c1bd60f5cc78412255090cc962e..b810c706b36bc6a87b5fc174b454a815aaec3109 100644 (file)
@@ -213,7 +213,7 @@ static int _mirrored_target_percent(void **target_state,
        return 1;
 }
 
-static int _mirrored_transient_status(struct lv_segment *seg, char *params)
+static int _mirrored_transient_status(struct dm_pool *mem, struct lv_segment *seg, char *params)
 {
        unsigned i, j;
        struct logical_volume *lv = seg->lv;
This page took 0.048959 seconds and 5 git commands to generate.