Files created with sl_FsCreate have a size that is a multiple of 4K blocks less 512 bytes. I assume that 512 bytes is meta information about the file. Which block are those 512 bytes taken from and what part of the block? I would assume that the first 4K block has the first 512 bytes reserved So offset "0" is actually 512 bytes into the block. The first full physical block of 4K would then be at offset (4096-512). Is this correct? I could also imagine it being the last 512 bytes of the last block.
It has been a few years since I worked with flash devices, but I recollect that once a block is erased (all set to the same bit) that you can write the block several times, but only in one direction. The flash I worked with erased to all 1 bits, meaning you can change a 1 to a 0 with a write but not a 0 to a 1. This is useful as you can "append" data without doing an erase cycle, preserving the life of the flash. Using a file to record 16 byte events means you could write up to 256 events without needing to actually erase the block. This is a huge savings on erase cycles.
In my application I want to save state information every minute. That is 1,440 writes per day. At 100,000 erase cycles I would wear out the block in 69 days, as opposed to 48 years if I don't need to erase for each appending write (assuming 16 byte state).
I have found precious little information about the filesystem, such as basic file layout, what happens when you do successive writes into the same block, and so on.