---
Resent as it accepts now an array of disks
lib/backend.py | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/lib/backend.py b/lib/backend.py
index 6b45a40..2bd9953 100644
--- a/lib/backend.py
+++ b/lib/backend.py
@@ -1353,6 +1353,30 @@ def BlockdevWipe(disk, offset, size):
_WipeDevice(rdev.dev_path, offset, size)
+def BlockdevPauseResumeSync(disks, pause):
+ """Pause or resume the sync of the block device.
+
+ @type disk: list of L{objects.Disk}
+ @param disk: the disks object we want to pause/resume
+ @type pause: bool
+ @param pause: Wheater to pause or resume
+
+ """
+ success = []
+ for disk in disks:
+ try:
+ rdev = _RecursiveFindBD(disk)
+ except errors.BlockDeviceError:
+ rdev = None
+
+ if not rdev:
+ _Fail("Cannot change sync for device %s: device not found", disk.iv_name)
+
+ success.append(rdev.PauseResumeSync(pause))
+
+ return success
+
+
def BlockdevRemove(disk):
"""Remove a block device.
--
1.7.3.1