master - vgchange: split out code for lockstart and lockstop
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=07cd88dcfa1411f23f5c0c8189377eee8ea2ee50 Commit: 07cd88dcfa1411f23f5c0c8189377eee8ea2ee50 Parent: f611b68f3c02b9af2521d7ea61061af3709fe87c Author: David Teigland <[email protected]> AuthorDate: Thu Jul 13 13:26:10 2017 -0500 Committer: David Teigland <[email protected]> CommitterDate: Mon Jul 24 14:12:08 2017 -0500
vgchange: split out code for lockstart and lockstop
Use the command definitions to separate the implementation of lockstop and lockstart from the rest of vgchange.
--- tools/command-lines.in | 4 +- tools/lvmcmdline.c | 2 + tools/tools.h | 1 + tools/vgchange.c | 149 +++++++++++++++++++++++++++--------------------- 4 files changed, 89 insertions(+), 67 deletions(-)
tools/command-lines.in +2 -2
@@ -1511,13 +1511,13 @@ ID: vgchange_refresh DESC: Reactivate LVs using the latest metadata. vgchange --lockstart -OO: --lockopt String, OO_VGCHANGE +OO: --lockopt String, --select String OP: VG|Tag|Select ... ID: vgchange_lockstart DESC: Start the lockspace of a shared VG in lvmlockd. vgchange --lockstop -OO: --lockopt String, OO_VGCHANGE +OO: --lockopt String, --select String OP: VG|Tag|Select ... ID: vgchange_lockstop DESC: Stop the lockspace of a shared VG in lvmlockd.
tools/lvmcmdline.c +2 -0
@@ -104,6 +104,8 @@ static const struct command_function command_functions[CMD_COUNT] = { { lvchange_persistent_CMD, lvchange_persistent_cmd }, { vgchange_locktype_CMD, vgchange_locktype_cmd }, + { vgchange_lockstart_CMD, vgchange_lock_start_stop_cmd }, + { vgchange_lockstop_CMD, vgchange_lock_start_stop_cmd },/* lvconvert utilities related to repair. */ { lvconvert_repair_pvs_or_thinpool_CMD, lvconvert_repair_pvs_or_thinpool_cmd },
tools/tools.h +1 -0
@@ -224,6 +224,7 @@ int vgchange_activate(struct cmd_context *cmd, struct volume_group *vg,int vgchange_background_polling (struct cmd_context *cmd,struct volume_group *vg);int vgchange_locktype_cmd (struct cmd_context *cmd,int argc,char **argv); +int vgchange_lock_start_stop_cmd (struct cmd_context *cmd,int argc,char **argv);struct lv_prop *get_lv_prop (int lvp_enum);struct lv_type *get_lv_type (int lvt_enum);
tools/vgchange.c +84 -65
201 lines not on this page · raw message