Skip to content
Snippets Groups Projects
Commit 38446261 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

LUBackupExport: Use node allocation lock


Block instance allocations when all node locks will be acquired.

Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent dc7d923e
No related branches found
No related tags found
No related merge requests found
......@@ -14068,6 +14068,11 @@ class LUBackupExport(LogicalUnit):
# - removing the removal operation altogether
self.needed_locks[locking.LEVEL_NODE] = locking.ALL_SET
 
# Allocations should be stopped while this LU runs with node locks, but
# it doesn't have to be exclusive
self.share_locks[locking.LEVEL_NODE_ALLOC] = 1
self.needed_locks[locking.LEVEL_NODE_ALLOC] = locking.ALL_SET
def DeclareLocks(self, level):
"""Last minute lock declaration."""
# All nodes are locked anyway, so nothing to do here.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment