mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
add a sync operation after every write
I did observe some PDDB corruption that happened today that looks ostensibly linked to a record that didn't sync up with the disk, so, let's be safer and sync everything. We can work on optimizing performance after correctness is guaranteed.
This commit is contained in:
parent
a103536b58
commit
515d49db08
1 changed files with 3 additions and 0 deletions
|
|
@ -1061,6 +1061,9 @@ fn xmain() -> ! {
|
|||
pbuf.retcode = PddbRetcode::BasisLost;
|
||||
}
|
||||
// we don't nede a "replace" operation because all ops happen in-place
|
||||
|
||||
// for now, do an expensive sync operation after every write to ensure data integrity
|
||||
basis_cache.sync(&mut pddb_os, None).expect("couldn't sync basis");
|
||||
}
|
||||
Some(Opcode::WriteKeyFlush) => msg_blocking_scalar_unpack!(msg, _, _, _, _, {
|
||||
match basis_cache.sync(&mut pddb_os, None) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue