1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-03 17:50:03 +03:00

lvmlockd: remove unused paramater

start_init option has never been used
This commit is contained in:
David Teigland 2024-06-17 17:44:41 -05:00
parent 4d8fb10af2
commit 9ea5ff3db5
4 changed files with 11 additions and 15 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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++;

View File

@ -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;
}