mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-23 21:35:29 +03:00
Locking P_global causes a cache refresh.
This commit is contained in:
parent
da27380ab5
commit
4cd97611e5
@ -115,8 +115,13 @@ int do_command(struct local_client *client, struct clvm_header *msg, int msglen,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CLVMD_CMD_LOCK_VG:
|
case CLVMD_CMD_LOCK_VG:
|
||||||
|
lockname = &args[2];
|
||||||
/* Check to see if the VG is in use by LVM1 */
|
/* Check to see if the VG is in use by LVM1 */
|
||||||
status = do_check_lvm1(&args[2]);
|
status = do_check_lvm1(lockname);
|
||||||
|
/* P_global causes a cache refresh */
|
||||||
|
if (strcmp(lockname, "P_global") == 0)
|
||||||
|
do_refresh_cache();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CLVMD_CMD_LOCK_LV:
|
case CLVMD_CMD_LOCK_LV:
|
||||||
|
@ -330,11 +330,14 @@ static int _lock_for_cluster(unsigned char cmd, uint32_t flags, char *name)
|
|||||||
* locks are cluster-wide.
|
* locks are cluster-wide.
|
||||||
* Also, if the lock is exclusive it makes no sense to try to
|
* Also, if the lock is exclusive it makes no sense to try to
|
||||||
* acquire it on all nodes, so just do that on the local node too.
|
* acquire it on all nodes, so just do that on the local node too.
|
||||||
|
* One exception, is that P_ locks /do/ get distributed across
|
||||||
|
* the cluster because they might have side-effects.
|
||||||
*/
|
*/
|
||||||
if (cmd == CLVMD_CMD_LOCK_VG ||
|
if (strncmp(name, "P_", 2) &&
|
||||||
(flags & LCK_TYPE_MASK) == LCK_EXCL ||
|
(cmd == CLVMD_CMD_LOCK_VG ||
|
||||||
(flags & LCK_LOCAL) ||
|
(flags & LCK_TYPE_MASK) == LCK_EXCL ||
|
||||||
!(flags & LCK_CLUSTER_VG))
|
(flags & LCK_LOCAL) ||
|
||||||
|
!(flags & LCK_CLUSTER_VG)))
|
||||||
node = ".";
|
node = ".";
|
||||||
|
|
||||||
status = _cluster_request(cmd, node, args, len,
|
status = _cluster_request(cmd, node, args, len,
|
||||||
|
Loading…
Reference in New Issue
Block a user