spiffs icon indicating copy to clipboard operation
spiffs copied to clipboard

O_TRUNC needs an option/callback to invalidate metadata

Open MMI opened this issue 6 years ago • 0 comments

In my application, I have been using the meta support to add CRC to my files.

Since I receive the files in chunks, over a wireless link, I don't update the CRC until I am certain I have received all of the data... so naively, the CRC field is either -1 for a new file (erased flash) or something valid.

When a file is opened with O_TRUNC or otherwise truncated, it would be nice if I had a way to invalidate this metadata.

MMI avatar Dec 13 '19 14:12 MMI