diff options
author | Alasdair Kergon <agk@redhat.com> | 2009-09-14 22:47:49 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2009-09-14 22:47:49 +0000 |
commit | 651ff9b32865373f9f6298fbe7b0ea5419da3746 (patch) | |
tree | 898c9215fdb07ca76b616f29cbcd45d3cbd74d21 /lib/locking/no_locking.c | |
parent | 905240f91da66571da073df8784f1f42b2888328 (diff) | |
download | lvm2-651ff9b32865373f9f6298fbe7b0ea5419da3746.tar.gz lvm2-651ff9b32865373f9f6298fbe7b0ea5419da3746.tar.xz lvm2-651ff9b32865373f9f6298fbe7b0ea5419da3746.zip |
Add lots of missing stack debug messages to tools.
Make readonly locking available as locking type 4.
Fix readonly locking to permit writeable global locks (for vgscan). (2.02.49)
Diffstat (limited to 'lib/locking/no_locking.c')
-rw-r--r-- | lib/locking/no_locking.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/locking/no_locking.c b/lib/locking/no_locking.c index 583ab5c2..f4a14ad6 100644 --- a/lib/locking/no_locking.c +++ b/lib/locking/no_locking.c @@ -71,10 +71,13 @@ static int _readonly_lock_resource(struct cmd_context *cmd, uint32_t flags) { if ((flags & LCK_TYPE_MASK) == LCK_WRITE && - (flags & LCK_SCOPE_MASK) == LCK_VG) { + (flags & LCK_SCOPE_MASK) == LCK_VG && + !(flags & LCK_CACHE) && + strcmp(resource, VG_GLOBAL)) { log_error("Write locks are prohibited with --ignorelockingfailure."); return 0; } + return _no_lock_resource(cmd, resource, flags); } |