Implemented much more aggressive OOO-write emulation
Now, instead of reverting only the first block on powerloss, _all_ blocks since the last sync are reverted (except the in-flight block, if you reverted that it would be the same as noop powerloss). It was a bit frustrating trying to reproduce known holes in our sync logic before this, but reverting all blocks really is the worst case, so we should have quite a bit more confidence going forward. This was a bit tricky to implement without memory leaks everywhere, since we need to be able to resume for exhaustive powerloss testing. But emubd's copy-on-write block emulation really shines here.
This commit is contained in:
+2
-2
@@ -140,8 +140,8 @@ typedef struct lfs_emubd {
|
||||
lfs_emubd_io_t proged;
|
||||
lfs_emubd_io_t erased;
|
||||
lfs_emubd_powercycles_t power_cycles;
|
||||
lfs_ssize_t ooo_block;
|
||||
lfs_emubd_block_t *ooo_data;
|
||||
lfs_emubd_block_t **ooo_before;
|
||||
lfs_emubd_block_t **ooo_after;
|
||||
lfs_emubd_disk_t *disk;
|
||||
|
||||
const struct lfs_emubd_config *cfg;
|
||||
|
||||
Reference in New Issue
Block a user