From ba6eda59e98a62893585b777b549b75fb1073740 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Mon, 26 Nov 2012 10:09:26 +0100 Subject: [PATCH] _ExportQuery: Use node allocation lock Block instance allocations when all node locks will be acquired. Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Guido Trotter <ultrotter@google.com> --- lib/cmdlib.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 954032b17..726da4f84 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -13951,6 +13951,9 @@ class _ExportQuery(_QueryBase): locking.LEVEL_NODE: self.wanted, } + if not self.names: + lu.needed_locks[locking.LEVEL_NODE_ALLOC] = locking.ALL_SET + def DeclareLocks(self, lu, level): pass -- GitLab