mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvmlockd: remove unused paramater
start_init option has never been used
This commit is contained in:
parent
4d8fb10af2
commit
9ea5ff3db5
@ -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
|
* for starting the lockspace. To use the vg after starting
|
||||||
* the lockspace, follow the standard method which is:
|
* the lockspace, follow the standard method which is:
|
||||||
* lock the vg, read/use/write the vg, unlock the vg.
|
* 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)));
|
char uuid[64] __attribute__((aligned(8)));
|
||||||
daemon_reply reply;
|
daemon_reply reply;
|
||||||
@ -1340,8 +1336,8 @@ int lockd_start_vg(struct cmd_context *cmd, struct volume_group *vg, int start_i
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_debug("lockd start VG %s lock_type %s init %d",
|
log_debug("lockd start VG %s lock_type %s",
|
||||||
vg->name, vg->lock_type ? vg->lock_type : "empty", start_init);
|
vg->name, vg->lock_type ? vg->lock_type : "empty");
|
||||||
|
|
||||||
if (!id_write_format(&vg->id, uuid, sizeof(uuid)))
|
if (!id_write_format(&vg->id, uuid, sizeof(uuid)))
|
||||||
return_0;
|
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",
|
"vg_uuid = %s", uuid[0] ? uuid : "none",
|
||||||
"version = " FMTd64, (int64_t) vg->seqno,
|
"version = " FMTd64, (int64_t) vg->seqno,
|
||||||
"host_id = " FMTd64, (int64_t) host_id,
|
"host_id = " FMTd64, (int64_t) host_id,
|
||||||
"opts = %s", start_init ? "start_init" : "none",
|
"opts = %s", "none",
|
||||||
NULL);
|
NULL);
|
||||||
_lockd_free_pv_list(&lock_pvs);
|
_lockd_free_pv_list(&lock_pvs);
|
||||||
} else {
|
} 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",
|
"vg_uuid = %s", uuid[0] ? uuid : "none",
|
||||||
"version = " FMTd64, (int64_t) vg->seqno,
|
"version = " FMTd64, (int64_t) vg->seqno,
|
||||||
"host_id = " FMTd64, (int64_t) host_id,
|
"host_id = " FMTd64, (int64_t) host_id,
|
||||||
"opts = %s", start_init ? "start_init" : "none",
|
"opts = %s", "none",
|
||||||
NULL);
|
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
|
* Depending on the problem that caused the rename to
|
||||||
* fail, it may make sense to not restart the VG here.
|
* 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);
|
log_error("Failed to restart VG %s lockspace.", vg->name);
|
||||||
return 1;
|
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);
|
log_error("Failed to start VG %s lockspace.", vg->name);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -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 */
|
/* 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_stop_vg(struct cmd_context *cmd, struct volume_group *vg);
|
||||||
int lockd_start_wait(struct cmd_context *cmd);
|
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;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -676,7 +676,7 @@ static int _vgchange_lock_start(struct cmd_context *cmd, struct volume_group *vg
|
|||||||
}
|
}
|
||||||
|
|
||||||
do_start:
|
do_start:
|
||||||
r = lockd_start_vg(cmd, vg, 0, &exists);
|
r = lockd_start_vg(cmd, vg, &exists);
|
||||||
|
|
||||||
if (r)
|
if (r)
|
||||||
vp->lock_start_count++;
|
vp->lock_start_count++;
|
||||||
|
@ -183,7 +183,7 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
if (vg_is_shared(vg)) {
|
if (vg_is_shared(vg)) {
|
||||||
const char *start_opt = arg_str_value(cmd, lockopt_ARG, NULL);
|
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");
|
log_error("Failed to start locking");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user