From cb699cccfeb037b97c930704f740f5db79adbac0 Mon Sep 17 00:00:00 2001 From: John Spray Date: Wed, 11 Nov 2015 10:24:50 +0000 Subject: [PATCH] tasks/cephfs: write_n_mb optionally background Signed-off-by: John Spray --- tasks/cephfs/mount.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tasks/cephfs/mount.py b/tasks/cephfs/mount.py index 832d0002e54..f714238fffb 100644 --- a/tasks/cephfs/mount.py +++ b/tasks/cephfs/mount.py @@ -281,17 +281,17 @@ class CephFSMount(object): self.background_procs.append(rproc) return rproc - def write_n_mb(self, filename, n_mb, seek=0): + def write_n_mb(self, filename, n_mb, seek=0, wait=True): """ Write the requested number of megabytes to a file """ assert(self.is_mounted()) - self.run_shell(["dd", "if=/dev/urandom", "of={0}".format(filename), - "bs=1M", - "count={0}".format(n_mb), - "seek={0}".format(seek) - ]) + return self.run_shell(["dd", "if=/dev/urandom", "of={0}".format(filename), + "bs=1M", + "count={0}".format(n_mb), + "seek={0}".format(seek) + ], wait=wait) def write_test_pattern(self, filename, size): log.info("Writing {0} bytes to {1}".format(size, filename))