(&self, ring_depth: u32)
| 128 | } |
| 129 | |
| 130 | fn create_async_io(&self, ring_depth: u32) -> BlockResult<Box<dyn AsyncIo>> { |
| 131 | match self.backend { |
| 132 | RawBackend::Sync => Ok(Box::new(RawFileSync::new(self.file.as_raw_fd()))), |
| 133 | #[cfg(feature = "io_uring")] |
| 134 | RawBackend::IoUring => Ok(Box::new(RawFileAsync::new( |
| 135 | self.file.as_raw_fd(), |
| 136 | ring_depth, |
| 137 | )?)), |
| 138 | RawBackend::Aio => Ok(Box::new(RawFileAsyncAio::new( |
| 139 | self.file.as_raw_fd(), |
| 140 | ring_depth, |
| 141 | )?)), |
| 142 | } |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | #[cfg(test)] |