mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-01-12 08:40:54 +00:00
devices: block: clear flush timer once it fires
Otherwise, the flush timer case of the PollContext continues to fire repeatedly, since the timerfd remains readable. BUG=None TEST=Verify that crosvm virtio_blk thread no longer pins the CPU after writes are done Change-Id: I693346c078e07b97e30083f34d00be75fa93841d Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1232295 Reviewed-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org>
This commit is contained in:
parent
616a093d91
commit
713dd60491
1 changed files with 4 additions and 0 deletions
|
@ -535,6 +535,10 @@ impl<T: DiskFile> Worker<T> {
|
||||||
error!("Failed to flush the disk: {:?}", e);
|
error!("Failed to flush the disk: {:?}", e);
|
||||||
break 'poll;
|
break 'poll;
|
||||||
}
|
}
|
||||||
|
if let Err(e) = flush_timer.wait() {
|
||||||
|
error!("Failed to clear flush timer: {:?}", e);
|
||||||
|
break 'poll;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Token::QueueAvailable => {
|
Token::QueueAvailable => {
|
||||||
if let Err(e) = queue_evt.read() {
|
if let Err(e) = queue_evt.read() {
|
||||||
|
|
Loading…
Reference in a new issue