This reverts commit 97be116a39.
This commit broke nxffs. This leaves the first block as empty which
then exposes another bug where when the pack is called because we
have reached the end of flash and need to look for deleted inodes
we search the first block find no inode and assume that there
are no more inodes. This then results in corrupting the filesystem
by writing over existing inodes.
This can be seen by runing the sim:nxffs configuration.
Prior to this commit the first pass of writing files would look like
this:
NXFFS Dump:
BLOCK:OFFS TYPE STATE LENGTH
0:5 INODE OK 2680
0:78 DATA OK 424
1:5 DATA OK 497
2:5 DATA OK 497
3:5 DATA OK 497
4:5 DATA OK 497
5:5 DATA OK 268
5:283 INODE OK 7410
5:425 DATA OK 77
6:5 DATA OK 497
With this commit:
NXFFS Dump:
BLOCK:OFFS TYPE STATE LENGTH
0:0 BLOCK ERASED 512
1:5 INODE OK 6394
1:39 DATA OK 463
2:5 DATA OK 497
3:5 DATA OK 497
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>