Commits

Kaspar Schiess committed 1a751ae

Switches to using rdsk everywhere

This has yielded a 2-10x performance gain in my early experiments. Will
verify on several other access methods and release once I am sure of
this.

Comments (0)

Files changed (8)

 PATH
   remote: .
   specs:
-    qemu-toolkit (0.3.3)
+    qemu-toolkit (0.3.4)
       clamp (~> 0.5)
 
 GEM

doc/qemu-toolkit-configuration.7

 .nf
 
 # Use a zvol block device
-disk \'/dev/zvol/dsk/pool1/myvm/disk1\'
+disk \'/dev/zvol/rdsk/pool1/myvm/disk1\'
 .
 .fi
 .

doc/qemu-toolkit-configuration.7.ronn

     over qemu options, use the `drive`-option.
     
         # Use a zvol block device
-        disk '/dev/zvol/dsk/pool1/myvm/disk1'
+        disk '/dev/zvol/rdsk/pool1/myvm/disk1'
 
   * drive <OPTIONS>:
     Directly add a drive directive to qemu options. If you use this, you'll

lib/qemu-toolkit/local_disk_set.rb

     
     def each_disk
       @disks.sort.each do |path|
-        yield "/dev/zvol/dsk/#{path}"
+        yield "/dev/zvol/rdsk/#{path}"
       end
     end
   end

lib/qemu-toolkit/vm.rb

               file: device, 
               if: 'virtio', 
               index: disk_index, 
-              media: 'disk'
+              media: 'disk', 
+              cache: 'none'
           }
           params[:boot] = 'on' if disk_index == 0
           cmd << "-drive " + parameter_list(params)

lib/qemu-toolkit/vmadm.rb

   # iscsi_target 'iqn.2012-01.com.qemu-toolkit:#{name}', "10.40.0.1"
   # 
   # Or a local disk, like a zvol for example: 
-  # disk /dev/zvol/dsk/pool/#{name}/disk1
+  # disk /dev/zvol/rdsk/pool/#{name}/disk1
 #{local_disks.string}
 
   # Network configuration

spec/acceptance/vmadm_spec.rb

         invoke 'create', 'foobar'
 
         File.readlines(config_file).map(&:strip).should include(
-          "disk '/dev/zvol/dsk/pool1/foobar/disk1'")
+          "disk '/dev/zvol/rdsk/pool1/foobar/disk1'")
         File.readlines(config_file).map(&:strip).should include(
-          "disk '/dev/zvol/dsk/pool1/foobar/disk2'")
+          "disk '/dev/zvol/rdsk/pool1/foobar/disk2'")
       end 
     end
     it "fails if the machine exists" do

spec/lib/qemu-toolkit/vm_spec.rb

     before(:each) { flexmock(iscsi, :produce_target => target) }
     
     it "includes all LUNs as hard disk" do
-      command.should include('-drive file=/dev/rdsk/c4t600144F0503CC9000000503201B00001d0p0,if=virtio,index=0,media=disk,boot=on')
-      command.should include('-drive file=/dev/rdsk/c4t600144F0503CC9000000503201B00001d0p1,if=virtio,index=1,media=disk')
+      command.should include('-drive file=/dev/rdsk/c4t600144F0503CC9000000503201B00001d0p0,if=virtio,index=0,media=disk,cache=none,boot=on')
+      command.should include('-drive file=/dev/rdsk/c4t600144F0503CC9000000503201B00001d0p1,if=virtio,index=1,media=disk,cache=none')
     end 
   end
   describe 'manual disk configuration' do