]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
qcow2: Schedule cache-clean-timer in realtime
authorHanna Czenczek <hreitz@redhat.com>
Mon, 10 Nov 2025 15:48:48 +0000 (16:48 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 18 Nov 2025 17:01:55 +0000 (18:01 +0100)
There is no reason why the cache cleaning timer should run in virtual
time, run it in realtime instead.

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
Message-ID: <20251110154854.151484-14-hreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2.c

index 05da58972958298c8bc3eecf594c478fa28c7244..e29810d86a3815a04a89c26b5eaa408ae4dc35a4 100644 (file)
@@ -846,7 +846,7 @@ static void coroutine_fn cache_clean_timer(void *opaque)
 
     while (wait_ns > 0) {
         qemu_co_sleep_ns_wakeable(&s->cache_clean_timer_wake,
-                                  QEMU_CLOCK_VIRTUAL, wait_ns);
+                                  QEMU_CLOCK_REALTIME, wait_ns);
 
         WITH_QEMU_LOCK_GUARD(&s->lock) {
             if (s->cache_clean_interval > 0) {