On Tue, Nov 15, 2011 at 10:50:01AM +0100, Michael Hanselmann wrote:
> Am 15. November 2011 10:33 schrieb Iustin Pop <ius...@google.com>:
> > On Tue, Nov 15, 2011 at 08:00:23AM +0100, Michael Hanselmann wrote:
> >> +    # 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…
> 
> It is, sorry. The first comment was right: the resource lock can be shared.

LGTM, thanks.

iustin

Reply via email to