1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

Propagate nosync flag around cluster.

This commit is contained in:
Alasdair Kergon 2006-05-11 19:05:21 +00:00
parent 532dae4854
commit 526a3c2186
5 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.06 -
=================================
Propagate nosync flag around cluster.
Allow vgreduce to handle mirror log failures.
Add --corelog to lvcreate and lvconvert.
Create a log header for replacement in-sync mirror log.

View File

@ -306,6 +306,9 @@ int do_lock_lv(unsigned char command, unsigned char lock_flags, char *resource)
if (lock_flags & LCK_PARTIAL_MODE)
init_partial(1);
if (lock_flags & LCK_MIRROR_NOSYNC_MODE)
init_mirror_in_sync(1);
switch (command) {
case LCK_LV_EXCLUSIVE:
status = do_activate_lv(resource, lock_flags, LKM_EXMODE);

View File

@ -333,6 +333,9 @@ static int _lock_for_cluster(unsigned char cmd, unsigned int flags, char *name)
if (partial_mode())
args[1] |= LCK_PARTIAL_MODE;
if (mirror_sync())
args[1] |= LCK_MIRROR_NOSYNC_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

@ -74,6 +74,7 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname);
* Additional lock bits for cluster communication
*/
#define LCK_PARTIAL_MODE 0x00000001 /* Running in partial mode */
#define LCK_MIRROR_NOSYNC_MODE 0x00000002 /* Mirrors don't require sync */
/*
* Common combinations

View File

@ -235,7 +235,7 @@ int reconfigure_mirror_images(struct lv_segment *mirrored_seg, uint32_t num_mirr
{
int r;
int insync = 0;
int mirror_dev_failed = (mirrored_seg->area_count != num_mirrors);
// int mirror_dev_failed = (mirrored_seg->area_count != num_mirrors);
float sync_percent = 0;
/* was the mirror in-sync before problems? */