mirror of
git://sourceware.org/git/lvm2.git
synced 2025-10-06 11:33:14 +03:00
o Lock mechanism for LV activation
o #defines for common lock flag combinations o Try out hyphens instead of colons in device-mapper names - does this make messages containing filenames easier to read?
This commit is contained in:
@@ -166,10 +166,18 @@ int lock_resource(struct cmd_context *cmd, const char *resource, int flags)
|
||||
if (!lv_resume_if_active(cmd, resource))
|
||||
return 0;
|
||||
break;
|
||||
case LCK_READ:
|
||||
if (!lv_activate_if_inactive(cmd, resource))
|
||||
return 0;
|
||||
break;
|
||||
case LCK_WRITE:
|
||||
if (!lv_suspend_if_active(cmd, resource))
|
||||
return 0;
|
||||
break;
|
||||
case LCK_EXCL:
|
||||
if (!lv_deactivate_if_active(cmd, resource))
|
||||
return 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user