mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
lvmlockd: add lockopt values for skipping selected locks
and add lockopt to common options.
This commit is contained in:
parent
f4675af4cf
commit
46cedb105b
@ -187,7 +187,7 @@
|
|||||||
# OO_ALL is included in every command automatically.
|
# OO_ALL is included in every command automatically.
|
||||||
#
|
#
|
||||||
OO_ALL: --commandprofile String, --config String, --debug,
|
OO_ALL: --commandprofile String, --config String, --debug,
|
||||||
--driverloaded Bool, --help, --longhelp, --profile String, --quiet,
|
--driverloaded Bool, --help, --lockopt String, --longhelp, --profile String, --quiet,
|
||||||
--verbose, --version, --yes, --test
|
--verbose, --version, --yes, --test
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -1524,19 +1524,18 @@ ID: vgchange_systemid
|
|||||||
DESC: Change the system ID of a VG.
|
DESC: Change the system ID of a VG.
|
||||||
|
|
||||||
vgchange --lockstart
|
vgchange --lockstart
|
||||||
OO: --lockopt String, --select String
|
OO: --select String
|
||||||
OP: VG|Tag|Select ...
|
OP: VG|Tag|Select ...
|
||||||
ID: vgchange_lockstart
|
ID: vgchange_lockstart
|
||||||
DESC: Start the lockspace of a shared VG in lvmlockd.
|
DESC: Start the lockspace of a shared VG in lvmlockd.
|
||||||
|
|
||||||
vgchange --lockstop
|
vgchange --lockstop
|
||||||
OO: --lockopt String, --select String
|
OO: --select String
|
||||||
OP: VG|Tag|Select ...
|
OP: VG|Tag|Select ...
|
||||||
ID: vgchange_lockstop
|
ID: vgchange_lockstop
|
||||||
DESC: Stop the lockspace of a shared VG in lvmlockd.
|
DESC: Stop the lockspace of a shared VG in lvmlockd.
|
||||||
|
|
||||||
vgchange --locktype LockType VG
|
vgchange --locktype LockType VG
|
||||||
OO: --lockopt String
|
|
||||||
ID: vgchange_locktype
|
ID: vgchange_locktype
|
||||||
DESC: Change the lock type for a shared VG.
|
DESC: Change the lock type for a shared VG.
|
||||||
|
|
||||||
@ -1563,7 +1562,7 @@ OO: --addtag Tag, --alloc Alloc, --autobackup Bool, --clustered Bool, --maxlogic
|
|||||||
--physicalextentsize SizeMB, --force, --zero Bool, --labelsector Number,
|
--physicalextentsize SizeMB, --force, --zero Bool, --labelsector Number,
|
||||||
--metadatasize SizeMB, --pvmetadatacopies MetadataCopiesPV, --vgmetadatacopies MetadataCopiesVG,
|
--metadatasize SizeMB, --pvmetadatacopies MetadataCopiesPV, --vgmetadatacopies MetadataCopiesVG,
|
||||||
--reportformat ReportFmt, --dataalignment SizeKB, --dataalignmentoffset SizeKB,
|
--reportformat ReportFmt, --dataalignment SizeKB, --dataalignmentoffset SizeKB,
|
||||||
--shared, --systemid String, --locktype LockType, --lockopt String
|
--shared, --systemid String, --locktype LockType
|
||||||
ID: vgcreate_general
|
ID: vgcreate_general
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@ -2682,6 +2682,16 @@ static int _init_lvmlockd(struct cmd_context *cmd)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (use_lvmlockd && arg_is_set(cmd, lockopt_ARG)) {
|
||||||
|
const char *opts = arg_str_value(cmd, lockopt_ARG, "");
|
||||||
|
if (strstr(opts, "skiplv"))
|
||||||
|
cmd->lockd_lv_disable = 1;
|
||||||
|
if (strstr(opts, "skipvg"))
|
||||||
|
cmd->lockd_vg_disable = 1;
|
||||||
|
if (strstr(opts, "skipgl"))
|
||||||
|
cmd->lockd_gl_disable = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (use_lvmlockd && locking_is_clustered()) {
|
if (use_lvmlockd && locking_is_clustered()) {
|
||||||
log_error("ERROR: configuration setting use_lvmlockd cannot be used with clustered locking_type 3.");
|
log_error("ERROR: configuration setting use_lvmlockd cannot be used with clustered locking_type 3.");
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user