Description
Hi,
In our product, we have some devices that were initialized with a block_count
that was larger than the real block count.
After formatting the flash, in an update we reduced the block count, this was fine because at this point the filesystem was empty.
But recently we wanted to push an update that bumps the littlefs library version past #584 (fail mount when block count changes), which now leads to a failure to mount.
#584 mentions the idea of adding a flag in the future that would allow overriding the introduced check.
Would it be possible to introduce this flag?
What would be the risk to just ignore this check for filesystems that were shrunk ? Is there any risk that the block_count in the superblock is used somewhere else?
Is it possible to make it so that the flag will overwrite the block_count the next time the superblock is relocated.
Maybe it would make sense when that happens to add a check that none of the now-deleted blocks are in use.