[pve-devel] [PATCH] zfs: fix wait by alloc_image

Wolfgang Link w.link at proxmox.com
Wed Jan 28 09:07:03 CET 2015


Signed-off-by: Wolfgang Link <w.link at proxmox.com>
---
 PVE/Storage/ZFSPoolPlugin.pm |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm
index 10da7f7..ed10484 100644
--- a/PVE/Storage/ZFSPoolPlugin.pm
+++ b/PVE/Storage/ZFSPoolPlugin.pm
@@ -185,6 +185,13 @@ sub alloc_image {
     
     $class->zfs_create_zvol($scfg, $name, $size);
 
+    run_command ("udevadm trigger --subsystem-match block");
+    run_command ("udevadm settle --timeout 5");
+    
+    for (1..4) {
+       Time::HiRes::usleep(100);
+    }
+
     return $name;
 }
 
-- 
1.7.10.4




More information about the pve-devel mailing list