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

Propagate partial mode around cluster.

This commit is contained in:
Alasdair Kergon 2006-03-09 22:34:13 +00:00
parent 9ab7701215
commit 9f5d8283a9
4 changed files with 15 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.03 -
===================================
Propagate partial mode around cluster.
Fix archive file expiration.
Fix dmeventd build.

View File

@ -303,6 +303,9 @@ int do_lock_lv(unsigned char command, unsigned char lock_flags, char *resource)
}
}
if (lock_flags & LCK_PARTIAL_MODE)
init_partial(1);
switch (command) {
case LCK_LV_EXCLUSIVE:
status = do_activate_lv(resource, lock_flags, LKM_EXMODE);
@ -331,6 +334,9 @@ int do_lock_lv(unsigned char command, unsigned char lock_flags, char *resource)
break;
}
if (lock_flags & LCK_PARTIAL_MODE)
init_partial(0);
/* clean the pool for another command */
dm_pool_empty(cmd->mem);

View File

@ -330,6 +330,9 @@ static int _lock_for_cluster(unsigned char cmd, unsigned int flags, char *name)
args[0] = flags & 0x7F; /* Maskoff lock flags */
args[1] = flags & 0xC0; /* Bitmap flags */
if (partial_mode())
args[1] |= LCK_PARTIAL_MODE;
/*
* VG locks are just that: locks, and have no side effects
* so we only need to do them on the local node because all

View File

@ -67,6 +67,11 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname);
#define LCK_LOCAL 0x00000040 /* Don't propagate to other nodes */
#define LCK_CLUSTER_VG 0x00000080 /* VG is clustered */
/*
* Additional lock bits for cluster communication
*/
#define LCK_PARTIAL_MODE 0x00000001 /* Running in partial mode */
/*
* Common combinations
*/