mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-23 13:57:47 +03:00
Fix target_register_events args.
This commit is contained in:
parent
c51a13caa6
commit
f2bdbe0d4d
@ -1,5 +1,6 @@
|
||||
Version 2.02.07 -
|
||||
=================================
|
||||
Fix target_register_events args.
|
||||
Prevent snapshots of mirrors.
|
||||
Add DISTCLEAN_TARGETS to make template for configure.h.
|
||||
More fixes to error paths.
|
||||
|
@ -598,8 +598,7 @@ int register_dev_for_events(struct cmd_context *cmd,
|
||||
int r = 0;
|
||||
struct list *tmp;
|
||||
struct lv_segment *seg;
|
||||
int (*reg) (struct dm_pool *mem, struct lv_segment *,
|
||||
struct config_tree *cft, int events);
|
||||
int (*reg) (struct lv_segment *, int events);
|
||||
|
||||
if (do_reg && !dmeventd_register_mode())
|
||||
return 1;
|
||||
@ -619,7 +618,7 @@ int register_dev_for_events(struct cmd_context *cmd,
|
||||
continue;
|
||||
|
||||
/* FIXME specify events */
|
||||
if (!reg(cmd->mem, seg, cmd->cft, 0)) {
|
||||
if (!reg(seg, 0)) {
|
||||
stack;
|
||||
return -1;
|
||||
}
|
||||
|
@ -78,12 +78,8 @@ struct segtype_handler {
|
||||
uint64_t *total_denominator, float *percent);
|
||||
int (*target_present) (void);
|
||||
void (*destroy) (const struct segment_type * segtype);
|
||||
int (*target_register_events) (struct dm_pool *mem,
|
||||
struct lv_segment *seg,
|
||||
struct cmd_context *cmd, int events);
|
||||
int (*target_unregister_events) (struct dm_pool *mem,
|
||||
struct lv_segment *seg,
|
||||
struct cmd_context *cmd, int events);
|
||||
int (*target_register_events) (struct lv_segment *seg, int events);
|
||||
int (*target_unregister_events) (struct lv_segment *seg, int events);
|
||||
};
|
||||
|
||||
struct segment_type *get_segtype_from_string(struct cmd_context *cmd,
|
||||
|
@ -390,9 +390,7 @@ static int _setup_registration(struct dm_pool *mem, struct cmd_context *cmd,
|
||||
|
||||
/* FIXME This gets run while suspended and performs banned operations. */
|
||||
/* FIXME Merge these two functions */
|
||||
static int _target_register_events(struct cmd_context *cmd,
|
||||
struct dm_pool *mem,
|
||||
struct lv_segment *seg,
|
||||
static int _target_register_events(struct lv_segment *seg,
|
||||
int events)
|
||||
{
|
||||
char *dso, *name;
|
||||
@ -402,12 +400,12 @@ static int _target_register_events(struct cmd_context *cmd,
|
||||
lv = seg->lv;
|
||||
vg = lv->vg;
|
||||
|
||||
if (!_setup_registration(mem, cmd, &dso)) {
|
||||
if (!_setup_registration(vg->cmd->mem, vg->cmd, &dso)) {
|
||||
stack;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!(name = build_dm_name(mem, vg->name, lv->name, NULL)))
|
||||
if (!(name = build_dm_name(vg->cmd->mem, vg->name, lv->name, NULL)))
|
||||
return_0;
|
||||
|
||||
/* FIXME Save a returned handle here so we can unregister it later */
|
||||
@ -419,9 +417,7 @@ static int _target_register_events(struct cmd_context *cmd,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int _target_unregister_events(struct cmd_context *cmd,
|
||||
struct dm_pool *mem,
|
||||
struct lv_segment *seg,
|
||||
static int _target_unregister_events(struct lv_segment *seg,
|
||||
int events)
|
||||
{
|
||||
char *dso;
|
||||
@ -433,10 +429,10 @@ static int _target_unregister_events(struct cmd_context *cmd,
|
||||
vg = lv->vg;
|
||||
|
||||
/* FIXME Remove this and use handle to avoid config file race */
|
||||
if (!_setup_registration(mem, cmd, &dso))
|
||||
if (!_setup_registration(vg->cmd->mem, vg->cmd, &dso))
|
||||
return_0;
|
||||
|
||||
if (!(name = build_dm_name(mem, vg->name, lv->name, NULL)))
|
||||
if (!(name = build_dm_name(vg->cmd->mem, vg->name, lv->name, NULL)))
|
||||
return_0;
|
||||
|
||||
/* FIXME Use handle returned by registration function instead of dso */
|
||||
|
Loading…
x
Reference in New Issue
Block a user