about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-06-01 22:34:48 +0200
committerGitHub <noreply@github.com>2020-06-01 22:34:48 +0200
commit8a388c82969263152d815c96fdfae3a1e242a757 (patch)
treececc1f119bba9db1b2e252e13f0a55535935fe8b
parent46fcaf3c8a13f32e2c147fd88f97c4ad2d3b0f27 (diff)
parentd85dc4f6902819be8277d1d65414e51bfbef0ac6 (diff)
downloadnixlib-8a388c82969263152d815c96fdfae3a1e242a757.tar
nixlib-8a388c82969263152d815c96fdfae3a1e242a757.tar.gz
nixlib-8a388c82969263152d815c96fdfae3a1e242a757.tar.bz2
nixlib-8a388c82969263152d815c96fdfae3a1e242a757.tar.lz
nixlib-8a388c82969263152d815c96fdfae3a1e242a757.tar.xz
nixlib-8a388c82969263152d815c96fdfae3a1e242a757.tar.zst
nixlib-8a388c82969263152d815c96fdfae3a1e242a757.zip
Merge pull request #82258 from erikarvstedt/fix-xchg-caching
fix inconsistent caching of VM xchg dirs
-rw-r--r--nixos/lib/test-driver/test-driver.py6
-rw-r--r--nixos/modules/virtualisation/qemu-vm.nix2
-rw-r--r--pkgs/build-support/vm/default.nix2
-rw-r--r--pkgs/build-support/vm/windows/controller/default.nix2
4 files changed, 3 insertions, 9 deletions
diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py
index bf46d0df97f9..e7b05968b079 100644
--- a/nixos/lib/test-driver/test-driver.py
+++ b/nixos/lib/test-driver/test-driver.py
@@ -598,11 +598,8 @@ class Machine:
                 shutil.copytree(host_src, host_intermediate)
             else:
                 shutil.copy(host_src, host_intermediate)
-            self.succeed("sync")
             self.succeed(make_command(["mkdir", "-p", vm_target.parent]))
             self.succeed(make_command(["cp", "-r", vm_intermediate, vm_target]))
-        # Make sure the cleanup is synced into VM
-        self.succeed("sync")
 
     def copy_from_vm(self, source: str, target_dir: str = "") -> None:
         """Copy a file from the VM (specified by an in-VM source path) to a path
@@ -620,7 +617,6 @@ class Machine:
             # Copy the file to the shared directory inside VM
             self.succeed(make_command(["mkdir", "-p", vm_shared_temp]))
             self.succeed(make_command(["cp", "-r", vm_src, vm_intermediate]))
-            self.succeed("sync")
             abs_target = out_dir / target_dir / vm_src.name
             abs_target.parent.mkdir(exist_ok=True, parents=True)
             # Copy the file from the shared directory outside VM
@@ -628,8 +624,6 @@ class Machine:
                 shutil.copytree(intermediate, abs_target)
             else:
                 shutil.copy(intermediate, abs_target)
-        # Make sure the cleanup is synced into VM
-        self.succeed("sync")
 
     def dump_tty_contents(self, tty: str) -> None:
         """Debugging: Dump the contents of the TTY<n>
diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix
index ac86330c098b..4592ffcfe4db 100644
--- a/nixos/modules/virtualisation/qemu-vm.nix
+++ b/nixos/modules/virtualisation/qemu-vm.nix
@@ -576,7 +576,7 @@ in
         "/tmp/xchg" =
           { device = "xchg";
             fsType = "9p";
-            options = [ "trans=virtio" "version=9p2000.L" "cache=loose" ];
+            options = [ "trans=virtio" "version=9p2000.L" ];
             neededForBoot = true;
           };
         "/tmp/shared" =
diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix
index f86e33713840..909cdc6da044 100644
--- a/pkgs/build-support/vm/default.nix
+++ b/pkgs/build-support/vm/default.nix
@@ -115,7 +115,7 @@ rec {
 
     echo "mounting host's temporary directory..."
     mkdir -p /fs/tmp/xchg
-    mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L,cache=loose
+    mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L
 
     mkdir -p /fs/proc
     mount -t proc none /fs/proc
diff --git a/pkgs/build-support/vm/windows/controller/default.nix b/pkgs/build-support/vm/windows/controller/default.nix
index 08b93aaf1174..9d13983a2833 100644
--- a/pkgs/build-support/vm/windows/controller/default.nix
+++ b/pkgs/build-support/vm/windows/controller/default.nix
@@ -53,7 +53,7 @@ let
       store /fs/nix/store
 
     mount -t 9p \
-      -o trans=virtio,version=9p2000.L,cache=loose \
+      -o trans=virtio,version=9p2000.L \
       xchg /fs/xchg
 
     echo root:x:0:0::/root:/bin/false > /fs/etc/passwd