1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Exclude VG_GLOBAL from vg_write_lock_held so scans open devs read-only again. (mbroz)

This commit is contained in:
Alasdair Kergon 2009-07-14 11:01:26 +00:00
parent 867ff24616
commit 7beb03dd2a
2 changed files with 10 additions and 7 deletions

View File

@ -1,12 +1,13 @@
Version 2.02.49 -
================================
Exclude VG_GLOBAL from vg_write_lock_held so scans open devs read-only again.
Add unit test case for liblvm VG create/delete APIs.
Add liblvm APIs to implement creation and deletion of VGs.
Initialize cmd->cmd_line to "liblvm".
Place handles to liblvm objects for pv, vg, lv, lvseg, pvseg inside lvm.h
Initialize cmd->cmd_line to "liblvm" in new liblvm library.
Place handles to liblvm objects for pv, vg, lv, lvseg, pvseg inside lvm.h.
Refactor vgsplit and vgextend to remove READ_REQUIRE_RESIZEABLE flag.
Changed exit() to _exit() after fork(); avoid flushing libc buffers twice.
Fixed invalid type being passed as printf argument on Sparc64.
Changed exit() to _exit() after fork() to avoid flushing libc buffers twice.
Add cast to log_info arg in _find_labeller to avoid Sparc64 warning.
Make cmd->cmd_line const.
Fix dev name mismatch in vgcreate man page example.
Refactor vg_remove_single for use in liblvm.

View File

@ -189,10 +189,12 @@ void reset_locking(void)
_unblock_signals();
}
static void _update_vg_lock_count(uint32_t flags)
static void _update_vg_lock_count(const char *resource, uint32_t flags)
{
/* Ignore locks not associated with updating VG metadata */
if ((flags & LCK_SCOPE_MASK) != LCK_VG ||
(flags & LCK_CACHE))
(flags & LCK_CACHE) ||
!strcmp(resource, VG_GLOBAL))
return;
if ((flags & LCK_TYPE_MASK) == LCK_UNLOCK)
@ -356,7 +358,7 @@ static int _lock_vol(struct cmd_context *cmd, const char *resource, uint32_t fla
== LCK_READ);
}
_update_vg_lock_count(flags);
_update_vg_lock_count(resource, flags);
}
_unlock_memory(flags);