diff --git a/lib/locking/lvmlockd.c b/lib/locking/lvmlockd.c index e8db30eaf..4d3f398c9 100644 --- a/lib/locking/lvmlockd.c +++ b/lib/locking/lvmlockd.c @@ -1310,13 +1310,9 @@ void lockd_free_vg_final(struct cmd_context *cmd, struct volume_group *vg) * for starting the lockspace. To use the vg after starting * the lockspace, follow the standard method which is: * lock the vg, read/use/write the vg, unlock the vg. - * - * start_init is 1 when the VG is being started after the - * command has done lockd_init_vg(). This tells lvmlockd - * that the VG lockspace being started is new. */ -int lockd_start_vg(struct cmd_context *cmd, struct volume_group *vg, int start_init, int *exists) +int lockd_start_vg(struct cmd_context *cmd, struct volume_group *vg, int *exists) { char uuid[64] __attribute__((aligned(8))); daemon_reply reply; @@ -1340,8 +1336,8 @@ int lockd_start_vg(struct cmd_context *cmd, struct volume_group *vg, int start_i return 0; } - log_debug("lockd start VG %s lock_type %s init %d", - vg->name, vg->lock_type ? vg->lock_type : "empty", start_init); + log_debug("lockd start VG %s lock_type %s", + vg->name, vg->lock_type ? vg->lock_type : "empty"); if (!id_write_format(&vg->id, uuid, sizeof(uuid))) return_0; @@ -1376,7 +1372,7 @@ int lockd_start_vg(struct cmd_context *cmd, struct volume_group *vg, int start_i "vg_uuid = %s", uuid[0] ? uuid : "none", "version = " FMTd64, (int64_t) vg->seqno, "host_id = " FMTd64, (int64_t) host_id, - "opts = %s", start_init ? "start_init" : "none", + "opts = %s", "none", NULL); _lockd_free_pv_list(&lock_pvs); } else { @@ -1389,7 +1385,7 @@ int lockd_start_vg(struct cmd_context *cmd, struct volume_group *vg, int start_i "vg_uuid = %s", uuid[0] ? uuid : "none", "version = " FMTd64, (int64_t) vg->seqno, "host_id = " FMTd64, (int64_t) host_id, - "opts = %s", start_init ? "start_init" : "none", + "opts = %s", "none", NULL); } @@ -3260,7 +3256,7 @@ int lockd_rename_vg_final(struct cmd_context *cmd, struct volume_group *vg, int * Depending on the problem that caused the rename to * fail, it may make sense to not restart the VG here. */ - if (!lockd_start_vg(cmd, vg, 0, NULL)) + if (!lockd_start_vg(cmd, vg, NULL)) log_error("Failed to restart VG %s lockspace.", vg->name); return 1; } @@ -3300,7 +3296,7 @@ int lockd_rename_vg_final(struct cmd_context *cmd, struct volume_group *vg, int } } - if (!lockd_start_vg(cmd, vg, 1, NULL)) + if (!lockd_start_vg(cmd, vg, NULL)) log_error("Failed to start VG %s lockspace.", vg->name); return 1; diff --git a/lib/locking/lvmlockd.h b/lib/locking/lvmlockd.h index e1369a704..59be37609 100644 --- a/lib/locking/lvmlockd.h +++ b/lib/locking/lvmlockd.h @@ -66,7 +66,7 @@ int lockd_rename_vg_final(struct cmd_context *cmd, struct volume_group *vg, int /* start and stop the lockspace for a vg */ -int lockd_start_vg(struct cmd_context *cmd, struct volume_group *vg, int start_init, int *exists); +int lockd_start_vg(struct cmd_context *cmd, struct volume_group *vg, int *exists); int lockd_stop_vg(struct cmd_context *cmd, struct volume_group *vg); int lockd_start_wait(struct cmd_context *cmd); @@ -157,7 +157,7 @@ static inline int lockd_rename_vg_final(struct cmd_context *cmd, struct volume_g return 1; } -static inline int lockd_start_vg(struct cmd_context *cmd, struct volume_group *vg, int start_init, int *exists) +static inline int lockd_start_vg(struct cmd_context *cmd, struct volume_group *vg, int *exists) { return 0; } diff --git a/tools/vgchange.c b/tools/vgchange.c index 137b1dc01..0fab16ccd 100644 --- a/tools/vgchange.c +++ b/tools/vgchange.c @@ -676,7 +676,7 @@ static int _vgchange_lock_start(struct cmd_context *cmd, struct volume_group *vg } do_start: - r = lockd_start_vg(cmd, vg, 0, &exists); + r = lockd_start_vg(cmd, vg, &exists); if (r) vp->lock_start_count++; diff --git a/tools/vgcreate.c b/tools/vgcreate.c index 14608777f..e65abb7cd 100644 --- a/tools/vgcreate.c +++ b/tools/vgcreate.c @@ -183,7 +183,7 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv) if (vg_is_shared(vg)) { const char *start_opt = arg_str_value(cmd, lockopt_ARG, NULL); - if (!lockd_start_vg(cmd, vg, 1, NULL)) { + if (!lockd_start_vg(cmd, vg, NULL)) { log_error("Failed to start locking"); goto out; }