1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-08-02 04:22:02 +03:00

Remove lockingfailed().

We provide a lock type that behaves like no_locking, but is not
  clustered. Moreover, it also forbids any write locks. This magically (and
  consistently) prevents use of clustered VGs, or changing local VGs with
  --ignorelockingfailure. As a bonus, we can remove the special hacks in a few
  places. Of course, people looking for trouble can always set their locking_type
  to 0 to override.
This commit is contained in:
Petr Rockai
2009-07-15 05:49:47 +00:00
parent 51dfb124e1
commit 6ee7d2aa53
7 changed files with 27 additions and 33 deletions

View File

@ -215,8 +215,6 @@ static void _update_vg_lock_count(const char *resource, uint32_t flags)
*/
int init_locking(int type, struct cmd_context *cmd)
{
init_lockingfailed(0);
if (type < 0)
type = find_config_tree_int(cmd, "global/locking_type", 1);
@ -279,9 +277,7 @@ int init_locking(int type, struct cmd_context *cmd)
/* FIXME Ensure only read ops are permitted */
log_verbose("Locking disabled - only read operations permitted.");
init_no_locking(&_locking, cmd);
init_lockingfailed(1);
init_readonly_locking(&_locking, cmd);
return 1;
}