Browse Source

dispvm: speedup sparse files handling by using bsdtar

Apparently it is much faster. Especially during savefile preparation -
tar reads the whole file, while bsdtar gets file map and reads only used
regions.
Marek Marczykowski-Górecki 9 years ago
parent
commit
d02aa70e93
3 changed files with 3 additions and 2 deletions
  1. 1 1
      dispvm/qfile-daemon-dvm
  2. 1 1
      dispvm/qubes-prepare-saved-domain.sh
  3. 1 0
      rpm_spec/core-dom0.spec

+ 1 - 1
dispvm/qfile-daemon-dvm

@@ -50,7 +50,7 @@ class QfileDaemonDvm:
         qvm_collection = QubesVmCollection()
         qvm_collection.lock_db_for_writing()
 
-        tar_process = subprocess.Popen(['tar', '-C', current_savefile_vmdir,
+        tar_process = subprocess.Popen(['bsdtar', '-C', current_savefile_vmdir,
             '-xSUf', os.path.join(current_savefile_vmdir, 'saved-cows.tar')])
 
         qvm_collection.load()

+ 1 - 1
dispvm/qubes-prepare-saved-domain.sh

@@ -60,5 +60,5 @@ fi
 rm -f $QMEMMAN_STOP
 ln -snf $VMDIR /var/lib/qubes/dvmdata/vmdir
 cd $VMDIR
-tar -Scf saved-cows.tar volatile.img
+bsdtar -cSf saved-cows.tar volatile.img
 echo "DVM savefile created successfully."

+ 1 - 0
rpm_spec/core-dom0.spec

@@ -62,6 +62,7 @@ Requires:       libvirt-daemon-xen
 Requires:       createrepo
 Requires:       gnome-packagekit
 Requires:       cronie
+Requires:       bsdtar
 # for qubes-hcl-report
 Requires:       dmidecode
 Requires:       PyQt4