1
0
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:
Alasdair Kergon
2002-02-27 12:26:41 +00:00
parent aaed82738a
commit 73a88ab3d3
18 changed files with 183 additions and 113 deletions

View File

@@ -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;
}