sleep earlier to prepare loop device creation
authorGui Chen <gui.chen@intel.com>
Tue, 4 Mar 2014 06:33:06 +0000 (01:33 -0500)
committerGui Chen <gui.chen@intel.com>
Tue, 4 Mar 2014 07:01:57 +0000 (02:01 -0500)
Fixes: #1646

Change-Id: If8e4fbe27e9320abf203eca82de6666271b00f86
Signed-off-by: Gui Chen <gui.chen@intel.com>
mic/utils/partitionedfs.py

index 8677c89..d0aa652 100644 (file)
@@ -461,6 +461,10 @@ class PartitionedMount(Mount):
                 raise MountError("Failed to map partitions for '%s'" %
                                  d['disk'].device)
 
+            # FIXME: need a better way to fix the latency
+            import time
+            time.sleep(1)
+
             if not os.path.exists(mapperdev):
                 # load mapper device if not updated
                 runner.quiet([self.dmsetup, "mknodes"])
@@ -470,9 +474,6 @@ class PartitionedMount(Mount):
                     raise MountError("Failed to load mapper devices for '%s'" %
                                      d['disk'].device)
 
-            # FIXME: need a better way to fix the latency
-            import time
-            time.sleep(1)
             d['mapped'] = True
 
     def __unmap_partitions(self):