diff --git a/pageserver/src/tenant/block_io.rs b/pageserver/src/tenant/block_io.rs index cbbdc0ce32..831f2c0744 100644 --- a/pageserver/src/tenant/block_io.rs +++ b/pageserver/src/tenant/block_io.rs @@ -154,7 +154,7 @@ impl FileBlockReader { } /// Read a page from the underlying file into given buffer. - fn fill_buffer(&self, buf: &mut [u8], blkno: u32) -> Result<(), std::io::Error> { + async fn fill_buffer(&self, buf: &mut [u8], blkno: u32) -> Result<(), std::io::Error> { assert!(buf.len() == PAGE_SZ); self.file.read_exact_at(buf, blkno as u64 * PAGE_SZ as u64) } @@ -178,7 +178,7 @@ impl FileBlockReader { ReadBufResult::Found(guard) => break Ok(guard.into()), ReadBufResult::NotFound(mut write_guard) => { // Read the page from disk into the buffer - self.fill_buffer(write_guard.deref_mut(), blknum)?; + self.fill_buffer(write_guard.deref_mut(), blknum).await?; write_guard.mark_valid(); // Swap for read lock