diff --git a/pageserver/src/virtual_file.rs b/pageserver/src/virtual_file.rs index a048967f3208..21bdfbb24d5b 100644 --- a/pageserver/src/virtual_file.rs +++ b/pageserver/src/virtual_file.rs @@ -429,7 +429,7 @@ impl VirtualFile { // Copied from https://doc.rust-lang.org/1.72.0/src/std/os/unix/fs.rs.html#117-135 pub async fn read_exact_at(&self, mut buf: &mut [u8], mut offset: u64) -> Result<(), Error> { while !buf.is_empty() { - match self.read_at(buf, offset) { + match self.read_at(buf, offset).await { Ok(0) => { return Err(Error::new( std::io::ErrorKind::UnexpectedEof, @@ -468,7 +468,7 @@ impl VirtualFile { Ok(()) } - pub fn read_at(&self, buf: &mut [u8], offset: u64) -> Result { + pub async fn read_at(&self, buf: &mut [u8], offset: u64) -> Result { let result = self.with_file("read", |file| file.read_at(buf, offset))?; if let Ok(size) = result { STORAGE_IO_SIZE