summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2015-05-14 14:10:24 -0500
committerDavid Teigland <teigland@redhat.com>2015-05-14 14:10:24 -0500
commit38a9a36dd99545a631c9178605d6e10449dd2e08 (patch)
treea369c5b99a83114612af72f612819aa11a5c51eb
parent9887fe333730f6972443635ac21e84702a34da53 (diff)
downloadlvm2-dev-dct-poll-vg-read.tar.gz
polldaemon: remove get_copy_vg and get_copy_lv wrappersdev-dct-poll-vg-read
These wrappers have been replaced by direct calls to vg_read() and find_lv().
-rw-r--r--lib/lvmpolld/polldaemon.h17
-rw-r--r--tools/lvconvert.c6
-rw-r--r--tools/lvpoll.c8
-rw-r--r--tools/polldaemon.c28
-rw-r--r--tools/pvmove.c2
5 files changed, 0 insertions, 61 deletions
diff --git a/lib/lvmpolld/polldaemon.h b/lib/lvmpolld/polldaemon.h
index 2c7ce4bbb..36b654fa3 100644
--- a/lib/lvmpolld/polldaemon.h
+++ b/lib/lvmpolld/polldaemon.h
@@ -29,15 +29,6 @@ struct daemon_parms;
struct poll_functions {
const char *(*get_copy_name_from_lv) (const struct logical_volume *lv);
- struct volume_group *(*get_copy_vg) (struct cmd_context *cmd,
- const char *name,
- const char *uuid,
- uint32_t flags);
- struct logical_volume *(*get_copy_lv) (struct cmd_context *cmd,
- struct volume_group *vg,
- const char *name,
- const char *uuid,
- uint64_t lv_type);
progress_t (*poll_progress)(struct cmd_context *cmd,
struct logical_volume *lv,
const char *name,
@@ -79,14 +70,6 @@ progress_t poll_mirror_progress(struct cmd_context *cmd,
struct logical_volume *lv, const char *name,
struct daemon_parms *parms);
-struct volume_group *poll_get_copy_vg(struct cmd_context *cmd, const char *name,
- const char *uuid, uint32_t flags);
-
-struct logical_volume *poll_get_copy_lv(struct cmd_context *cmd,
- struct volume_group *vg,
- const char *name, const char *uuid,
- uint64_t lv_type);
-
int wait_for_single_lv(struct cmd_context *cmd, struct poll_operation_id *id,
struct daemon_parms *parms);
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 40c5534e7..cfa1ebf3a 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -700,22 +700,16 @@ static int _read_params(struct cmd_context *cmd, int argc, char **argv,
}
static struct poll_functions _lvconvert_mirror_fns = {
- .get_copy_vg = poll_get_copy_vg,
- .get_copy_lv = poll_get_copy_lv,
.poll_progress = poll_mirror_progress,
.finish_copy = lvconvert_mirror_finish,
};
static struct poll_functions _lvconvert_merge_fns = {
- .get_copy_vg = poll_get_copy_vg,
- .get_copy_lv = poll_get_copy_lv,
.poll_progress = poll_merge_progress,
.finish_copy = lvconvert_merge_finish,
};
static struct poll_functions _lvconvert_thin_merge_fns = {
- .get_copy_vg = poll_get_copy_vg,
- .get_copy_lv = poll_get_copy_lv,
.poll_progress = poll_thin_merge_progress,
.finish_copy = lvconvert_merge_finish,
};
diff --git a/tools/lvpoll.c b/tools/lvpoll.c
index 6db0ade92..4e92e525f 100644
--- a/tools/lvpoll.c
+++ b/tools/lvpoll.c
@@ -19,30 +19,22 @@
#include "polling_ops.h"
static struct poll_functions _pvmove_fns = {
- .get_copy_lv = poll_get_copy_lv,
- .get_copy_vg = poll_get_copy_vg,
.poll_progress = poll_mirror_progress,
.update_metadata = pvmove_update_metadata,
.finish_copy = pvmove_finish
};
static struct poll_functions _convert_fns = {
- .get_copy_lv = poll_get_copy_lv,
- .get_copy_vg = poll_get_copy_vg,
.poll_progress = poll_mirror_progress,
.finish_copy = lvconvert_mirror_finish
};
static struct poll_functions _merge_fns = {
- .get_copy_lv = poll_get_copy_lv,
- .get_copy_vg = poll_get_copy_vg,
.poll_progress = poll_merge_progress,
.finish_copy = lvconvert_merge_finish
};
static struct poll_functions _thin_merge_fns = {
- .get_copy_lv = poll_get_copy_lv,
- .get_copy_vg = poll_get_copy_vg,
.poll_progress = poll_thin_merge_progress,
.finish_copy = lvconvert_merge_finish
};
diff --git a/tools/polldaemon.c b/tools/polldaemon.c
index 43fbc17c0..3b476f939 100644
--- a/tools/polldaemon.c
+++ b/tools/polldaemon.c
@@ -54,34 +54,6 @@ progress_t poll_mirror_progress(struct cmd_context *cmd,
return PROGRESS_FINISHED_SEGMENT;
}
-struct volume_group *poll_get_copy_vg(struct cmd_context *cmd,
- const char *name,
- const char *uuid __attribute__((unused)),
- uint32_t flags)
-{
- dev_close_all();
-
- if (name && !strchr(name, '/'))
- return vg_read(cmd, name, NULL, flags);
-
- /* 'name' is the full LV name; must extract_vgname() */
- return vg_read(cmd, extract_vgname(cmd, name), NULL, flags);
-}
-
-struct logical_volume *poll_get_copy_lv(struct cmd_context *cmd __attribute__((unused)),
- struct volume_group *vg,
- const char *name,
- const char *uuid,
- uint64_t lv_type)
-{
- struct logical_volume *lv = find_lv(vg, name);
-
- if (!lv || (uuid && strcmp(uuid, (char *)&lv->lvid)) || (lv_type && !(lv->status & lv_type)))
- return NULL;
-
- return lv;
-}
-
static int _check_lv_status(struct cmd_context *cmd,
struct volume_group *vg,
struct logical_volume *lv,
diff --git a/tools/pvmove.c b/tools/pvmove.c
index 61fe3e4c5..f537b6104 100644
--- a/tools/pvmove.c
+++ b/tools/pvmove.c
@@ -754,8 +754,6 @@ static int _read_poll_id_from_pvname(struct cmd_context *cmd, const char *pv_nam
static struct poll_functions _pvmove_fns = {
.get_copy_name_from_lv = get_pvmove_pvname_from_lv_mirr,
- .get_copy_vg = poll_get_copy_vg,
- .get_copy_lv = poll_get_copy_lv,
.poll_progress = poll_mirror_progress,
.update_metadata = pvmove_update_metadata,
.finish_copy = pvmove_finish,