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

Unlock shared lock if activation calls failed.

Clvmd should unlock new lock if activation in device-mapper fails.
This commit is contained in:
Milan Broz 2010-01-26 08:00:02 +00:00
parent b1ef9cd0ad
commit 9b5fd08d26
2 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.60 - 23rd January 2010
===================================
Unlock shared lock in clvmd if activation calls failed.
Fix return code of info call for query by uuid.
Extend cmirrord man page.
Sleep before first progress check if pvmove/lvconvert interval has prefix '+'.

View File

@ -373,17 +373,22 @@ static int do_activate_lv(char *resource, unsigned char lock_flags, int mode)
/* If it's suspended then resume it */
if (!lv_info_by_lvid(cmd, resource, &lvi, 0, 0))
return EIO;
goto error;
if (lvi.suspended)
if (!lv_resume(cmd, resource))
return EIO;
goto error;
/* Now activate it */
if (!lv_activate(cmd, resource, exclusive))
return EIO;
goto error;
return 0;
error:
if (oldmode == -1 || oldmode != mode)
(void)hold_unlock(resource);
return EIO;
}
/* Resume the LV if it was active */