From 237b9fefd7a73fc79c11ac962574480172f89386 Mon Sep 17 00:00:00 2001 From: PThorpe92 Date: Mon, 8 Sep 2025 11:49:33 -0400 Subject: [PATCH] Fix infinite loop when IO failure happens on allocating first page --- .gitignore | 1 + core/storage/pager.rs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 896698406..294912817 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ *.so *.ipynb +*.o # Python .mypy_cache/ diff --git a/core/storage/pager.rs b/core/storage/pager.rs index 61cd59bc6..31eb980cd 100644 --- a/core/storage/pager.rs +++ b/core/storage/pager.rs @@ -1012,9 +1012,10 @@ impl Pager { // Give a chance for the allocation to happen elsewhere _ => {} } + } else { + // Give a chance for the allocation to happen elsewhere + io_yield_one!(Completion::new_dummy()); } - // Give a chance for the allocation to happen elsewhere - io_yield_one!(Completion::new_dummy()); } Ok(IOResult::Done(())) }