Revision 6d2e83d5 lib/config.py

b/lib/config.py
389 389
    self._WriteConfig()
390 390
    return port
391 391

  
392
  def _ComputeDRBDMap(self, instance):
392
  def _UnlockedComputeDRBDMap(self):
393 393
    """Compute the used DRBD minor/nodes.
394 394

  
395 395
    @return: dictionary of node_name: dict of minor: instance_name;
......
422 422
    return my_dict
423 423

  
424 424
  @locking.ssynchronized(_config_lock)
425
  def ComputeDRBDMap(self):
426
    """Compute the used DRBD minor/nodes.
427

  
428
    This is just a wrapper over L{_UnlockedComputeDRBDMap}.
429

  
430
    @return: dictionary of node_name: dict of minor: instance_name;
431
        the returned dict will have all the nodes in it (even if with
432
        an empty list).
433

  
434
    """
435
    return self._UnlockedComputeDRBDMap()
436

  
437
  @locking.ssynchronized(_config_lock)
425 438
  def AllocateDRBDMinor(self, nodes, instance):
426 439
    """Allocate a drbd minor.
427 440

  
......
431 444
    order as the passed nodes.
432 445

  
433 446
    """
434
    d_map = self._ComputeDRBDMap(instance)
447
    d_map = self._UnlockedComputeDRBDMap()
435 448
    result = []
436 449
    for nname in nodes:
437 450
      ndata = d_map[nname]

Also available in: Unified diff