Revision 96acbc09 lib/backend.py

b/lib/backend.py
1384 1384
    rbd = _RecursiveFindBD(dsk)
1385 1385
    if rbd is None:
1386 1386
      _Fail("Can't find device %s", dsk)
1387
    stats.append(rbd.CombinedSyncStatus())
1387

  
1388
    dstatus = rbd.CombinedSyncStatus()
1389

  
1390
    stats.append((dstatus.sync_percent, dstatus.estimated_time,
1391
                  dstatus.is_degraded, dstatus.ldisk_degraded))
1392

  
1388 1393
  return stats
1389 1394

  
1390 1395

  
......
1415 1420

  
1416 1421
  @type disk: L{objects.Disk}
1417 1422
  @param disk: the disk to find
1418
  @rtype: None or tuple
1419
  @return: None if the disk cannot be found, otherwise a
1420
      tuple (device_path, major, minor, sync_percent,
1421
      estimated_time, is_degraded)
1423
  @rtype: None or objects.BlockDevStatus
1424
  @return: None if the disk cannot be found, otherwise a the current
1425
           information
1422 1426

  
1423 1427
  """
1424 1428
  try:
1425 1429
    rbd = _RecursiveFindBD(disk)
1426 1430
  except errors.BlockDeviceError, err:
1427 1431
    _Fail("Failed to find device: %s", err, exc=True)
1432

  
1428 1433
  if rbd is None:
1429 1434
    return None
1430
  return (rbd.dev_path, rbd.major, rbd.minor) + rbd.GetSyncStatus()
1435

  
1436
  return rbd.GetSyncStatus()
1431 1437

  
1432 1438

  
1433 1439
def UploadFile(file_name, data, mode, uid, gid, atime, mtime):

Also available in: Unified diff