mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lib: pass mem pool to check_transient_status
check_transient_status() may need to allocate some memory, so pass in already existing mem pool.
This commit is contained in:
parent
c717ea5fc0
commit
6336ef98d4
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user