master - polldaemon: remove get_copy_vg and get_copy_lv wrappers
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7a8ce8dbf73fc149c67b22e3b90f542f70944e93 Commit: 7a8ce8dbf73fc149c67b22e3b90f542f70944e93 Parent: 6fba37777c8a0931adf1164ff914aa494d8bcee8 Author: David Teigland <[email protected]> AuthorDate: Tue May 19 15:13:01 2015 +0200 Committer: Ondrej Kozina <[email protected]> CommitterDate: Tue May 19 20:56:15 2015 +0200
polldaemon: remove get_copy_vg and get_copy_lv wrappers
These wrappers have been replaced by direct calls
to vg_read() and find_lv() in previous commits.
This commit should have no functional impact since all bits were already unreachable.
--- lib/lvmpolld/polldaemon.h | 17 ----------------- tools/lvconvert.c | 6 ------ tools/lvpoll.c | 8 -------- tools/polldaemon.c | 26 -------------------------- tools/pvmove.c | 2 -- 5 files changed, 0 insertions(+), 59 deletions(-)
lib/lvmpolld/polldaemon.h +0 -17
@@ -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);
tools/lvconvert.c +0 -6
@@ -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, };
tools/lvpoll.c +0 -8
@@ -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 };
tools/polldaemon.c +0 -26
@@ -54,32 +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) -{ -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,
tools/pvmove.c +0 -2
@@ -744,8 +744,6 @@ static int _read_poll_id_from_pvname(struct cmd_context *cmd, const char *pv_namstatic 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,