mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-27 11:54:30 +01:00
Merge 'Use pwrite for single buffer pwritev call in unix IO' from Preston Thorpe
Closes #2416
This commit is contained in:
@@ -543,6 +543,10 @@ impl File for UnixFile<'_> {
|
||||
buffers: Vec<Arc<RefCell<crate::Buffer>>>,
|
||||
c: Completion,
|
||||
) -> Result<Completion> {
|
||||
if buffers.len().eq(&1) {
|
||||
// use `pwrite` for single buffer
|
||||
return self.pwrite(pos, buffers[0].clone(), c);
|
||||
}
|
||||
let file = self
|
||||
.file
|
||||
.lock()
|
||||
|
||||
Reference in New Issue
Block a user