Cherry-picked upstream out-of-order emubd testing

More information upstream (f2a6f45, fc2aa33, 7873d81), but this adds
LFS_EMUBD_POWERLOS_OOO for testing out-of-order block devices that
require sync to be called for things to serialize. It's a simple
implementation, just reverts the first write since last sync on
powerloss, but gets the job done.

Cherry-picking these changes required reverting emubd's scratch buffer,
but carrying around an extra ~block_size of memory isn't a big deal
here.
This commit is contained in:
Christopher Haster
2024-02-27 12:58:07 -06:00
parent 1ecb346cec
commit b5370d6001
5 changed files with 153 additions and 46 deletions
+2 -1
View File
@@ -157,7 +157,8 @@ void bench_permutation(size_t i, uint32_t *buffer, size_t size);
#define BENCH_BDCFG \
.erase_value = ERASE_VALUE, \
.erase_cycles = ERASE_CYCLES, \
.badblock_behavior = BADBLOCK_BEHAVIOR,
.badblock_behavior = BADBLOCK_BEHAVIOR, \
.powerloss_behavior = POWERLOSS_BEHAVIOR,
#endif