On Mon, Feb 5, 2024 at 2:36 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote:
> Hello Kinsey, > > On 02.02.24 23:03, Kinsey Moore wrote: > > On JFFS2 file systems on NOR flash or dataflash that does not have spare > > area for metadata and thus does not invoke delayed writes, it is > > possible to put the file system into a state where all blocks have been > > written to and all files have been deleted from the filesystem. There is > > a bug in the JFFS2 file system scan routine that detects this situation > > as a corrupted file system since the scan routine relies on "used" space > > to discriminate a valid file system when there are blocks that need to > > be erased. The correct fix would require a partial rewrite of the scan > > routine, so instead this patch tracks the space marked as obsolete along > > with space at the end of each block that is otherwise too small to > > contain a JFFS2 node so that it can me compared with the dirty space. > > Corrupted data (or otherwise non-JFFS2 blocks) will still cause this > > check to fail as corrupted data isn't recognized as obsoleted (deleted) > > nodes. > > this should be reported to the Linux JFFS2 maintainers. A test case > would be also nice. > I'm already communicating with the Linux MTD group over IRC and provided them an example FS image that reproduces the problem along with this patch that works around it. I should be able to get this into a test case. Kinsey
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel