git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #82258 from erikarvstedt/fix-xchg-caching

fix inconsistent caching of VM xchg dirs

commit8a388c82969263152d815c96fdfae3a1e242a757 authorFlorian Klink <flokli@flokli.de> dateMon 1 Jun 2020, 22:34 (6 years ago) parent46fcaf3d85dc4f
4 files changed+3−9
nixos/lib/test-driver/test-driver.py−6 nixos/modules/virtualisation/qemu-vm.nix+1−1 pkgs/build-support/vm/default.nix+1−1 pkgs/build-support/vm/windows/controller/default.nix+1−1
nixos/lib/test-driver/test-driver.py−6
@@ -598,11 +598,8 @@ class Machine:
598598 shutil.copytree(host_src, host_intermediate)
599599 else:
600600 shutil.copy(host_src, host_intermediate)
601− self.succeed("sync")
602601 self.succeed(make_command(["mkdir", "-p", vm_target.parent]))
603602 self.succeed(make_command(["cp", "-r", vm_intermediate, vm_target]))
604− # Make sure the cleanup is synced into VM
605− self.succeed("sync")
606603
607604 def copy_from_vm(self, source: str, target_dir: str = "") -> None:
608605 """Copy a file from the VM (specified by an in-VM source path) to a path
@@ -620,7 +617,6 @@ class Machine:
620617 # Copy the file to the shared directory inside VM
621618 self.succeed(make_command(["mkdir", "-p", vm_shared_temp]))
622619 self.succeed(make_command(["cp", "-r", vm_src, vm_intermediate]))
623− self.succeed("sync")
624620 abs_target = out_dir / target_dir / vm_src.name
625621 abs_target.parent.mkdir(exist_ok=True, parents=True)
626622 # Copy the file from the shared directory outside VM
@@ -628,8 +624,6 @@ class Machine:
628624 shutil.copytree(intermediate, abs_target)
629625 else:
630626 shutil.copy(intermediate, abs_target)
631− # Make sure the cleanup is synced into VM
632− self.succeed("sync")
633627
634628 def dump_tty_contents(self, tty: str) -> None:
635629 """Debugging: Dump the contents of the TTY<n>
nixos/modules/virtualisation/qemu-vm.nix+1−1
@@ -576,7 +576,7 @@ in
576576 "/tmp/xchg" =
577577 { device = "xchg";
578578 fsType = "9p";
579− options = [ "trans=virtio" "version=9p2000.L" "cache=loose" ];
579+ options = [ "trans=virtio" "version=9p2000.L" ];
580580 neededForBoot = true;
581581 };
582582 "/tmp/shared" =
pkgs/build-support/vm/default.nix+1−1
@@ -115,7 +115,7 @@ rec {
115115
116116 echo "mounting host's temporary directory..."
117117 mkdir -p /fs/tmp/xchg
118− mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L,cache=loose
118+ mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L
119119
120120 mkdir -p /fs/proc
121121 mount -t proc none /fs/proc
pkgs/build-support/vm/windows/controller/default.nix+1−1
@@ -53,7 +53,7 @@ let
5353 store /fs/nix/store
5454
5555 mount -t 9p \
56− -o trans=virtio,version=9p2000.L,cache=loose \
56+ -o trans=virtio,version=9p2000.L \
5757 xchg /fs/xchg
5858
5959 echo root:x:0:0::/root:/bin/false > /fs/etc/passwd