SPIFFS : FIXES FS corruption against high numbero f current losses, high number of files manipulation. FIXES LOG_BLOCK erasing handlers. FIXES Garbage Collector. Overall, SPIFFS should now be WAY MORE resilient to any form of misbehavior. In case of corrupted filesystem (should still be readable !), spamming 'mem spiffs check' from the client will ensure at least 2 new free 4k blocks each tile (if number of LOG_PAGE available is enough) and in the same pass will move/reorganize the LOG_PAGES of contextual blocks. Yiha

This commit is contained in:
cjbrigato 2019-08-13 15:58:08 +02:00 committed by Philippe Teuwen
commit 961f98c125
8 changed files with 100 additions and 69 deletions

View file

@ -7,8 +7,9 @@
#ifndef SPIFFS_H_
#define SPIFFS_H_
#include "common.h"
#if defined(__cplusplus)
extern "C" {
#endif
#include "spiffs_config.h"
@ -32,7 +33,7 @@ typedef struct rdv40_spiffs_fsinfo {
int rdv40_spiffs_read_as_filetype(char *filename, uint8_t *dst, uint32_t size, RDV40SpiFFSSafetyLevel level);
int rdv40_spiffs_check();
int rdv40_spiffs_lazy_unmount();
int rdv40_spiffs_lazy_mount();
int rdv40_spiffs_lazy_mount_rollback(int changed);
@ -853,5 +854,8 @@ u32_t SPIFFS_buffer_bytes_for_cache(spiffs *fs, u32_t num_pages);
#if SPIFFS_CACHE
#endif
#if defined(__cplusplus)
}
#endif
#endif /* SPIFFS_H_ */