From ba50f57e93a24538504c63d4f9cb5dc4930f9e7f Mon Sep 17 00:00:00 2001 From: Stefan Reiter Date: Tue, 13 Jul 2021 11:23:20 +0200 Subject: [PATCH] file-restore: increase lock timeout on QEMU map This lock is held during VM startup, so that multiple calls will not start VMs twice. But this means that the timeout needs to incorporate the time it might take a VM to boot, so increase it quite a bit. This could previously lead to "interrupted system call" errors when accessing backups with many disks. Signed-off-by: Stefan Reiter (cherry picked from commit 66501529a2efbd5a426eba56ff8604db157b7814) Signed-off-by: Thomas Lamprecht --- src/bin/proxmox_file_restore/block_driver_qemu.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/proxmox_file_restore/block_driver_qemu.rs b/src/bin/proxmox_file_restore/block_driver_qemu.rs index 24f62796..46d91198 100644 --- a/src/bin/proxmox_file_restore/block_driver_qemu.rs +++ b/src/bin/proxmox_file_restore/block_driver_qemu.rs @@ -50,7 +50,7 @@ impl VMStateMap { /// Acquire a lock on the state map and retrieve a deserialized version fn load() -> Result { let mut file = Self::open_file_raw(true)?; - lock_file(&mut file, true, Some(std::time::Duration::from_secs(5)))?; + lock_file(&mut file, true, Some(std::time::Duration::from_secs(120)))?; let map = serde_json::from_reader(&file).unwrap_or_default(); Ok(Self { map, file }) }