On Tue, Nov 15, 2011 at 08:00:23AM +0100, Michael Hanselmann wrote: > Also acquire instance and resource locks in shared mode (see comment).
I reqad the comments, but I'm not sure I agree :) > + # Since modifying a node can have severe effects on currently running > + # operations the resource lock is at least acquired in shared mode > + self.needed_locks[locking.LEVEL_NODE_RES] = \ > + self.needed_locks[locking.LEVEL_NODE] > + > + # Get node and instance locks in shared mode; they are not used for > + # anything but read-only access > + self.share_locks[locking.LEVEL_NODE_RES] = 1 Comment says node, but lock is node res? > + self.share_locks[locking.LEVEL_INSTANCE] = 1 Can't see from the context, but the node lock is still in exclusive, right? So maybe it's just comment typo… thanks! iustin