[thin_check (rust)] drop O_DIRECT for the sync_io engine.

O_DIRECT slows us down, and there's no correctness reason for having it.
This commit is contained in:
Joe Thornber 2020-08-21 11:39:41 +01:00
parent cda92de441
commit b82307d8a5

View File

@ -49,6 +49,10 @@ unsafe impl Send for Block {}
pub trait IoEngine { pub trait IoEngine {
fn get_nr_blocks(&self) -> u64; fn get_nr_blocks(&self) -> u64;
// FIXME: we need to indicate an error per block. Add error field
// to block? Data should not be accessible if a read failed.
// We should support retry for failed writes.
fn read(&self, block: &mut Block) -> Result<()>; fn read(&self, block: &mut Block) -> Result<()>;
fn read_many(&self, blocks: &mut [Block]) -> Result<()>; fn read_many(&self, blocks: &mut [Block]) -> Result<()>;
fn write(&self, block: &Block) -> Result<()>; fn write(&self, block: &Block) -> Result<()>;
@ -73,7 +77,6 @@ impl SyncIoEngine {
let file = OpenOptions::new() let file = OpenOptions::new()
.read(true) .read(true)
.write(writeable) .write(writeable)
.custom_flags(libc::O_DIRECT)
.open(path)?; .open(path)?;
Ok(file) Ok(file)