97f867b28d
The grm bugs were mostly issues with: 1. Not maintaining the on-disk grm state in RAM (lfs->grm) correctly, this needs to be updated correctly after every commit or littlefs gets a confused. 2. lfsr_fs_fixgrm got a bit confused when it was missed when changing the no-rm encoding from 0 to -2. Added some inline functions to help avoid this in the future. 3. Leaking information due to mixing fixed sized and variable sized encodings of the grm delta in places. This is a bit tricky to write an assert for as we don't parse the full grm when we see a no-rm grm.