Question about file size 0 after filesystem recovery
dufault at hda.com
Tue Jan 5 19:49:30 UTC 2021
> On Jan 5, 2021, at 13:49 , Charles Manning <cdhmanning at gmail.com> wrote:
> What you get will depend very much on what file system you are using. Each file system has different behaviours.
> If you have an application where you can yank power without a clean shutdown then it is advisable to use a file system with a more predictable caching policy.
> For example, Yaffs (the file system I wrote) guarantees that the write has made it to media when the file is synced (fsync() and fdatasync() ) or closed.
> If the file system's fsync()and close() only guarantee that that data is written into the block device's buffers then you have no guarantees.
Yaffs is is associated with flash, and should be predictable, but in general you need to be concerned with disk caches. Successful transfer to a disk doesn't mean the data is stored on the media.
I expect that's why the open group document specifies in the "RATIONALE" section that the conformance document should identify a way to identify how a file can be created in a manner that "fsync()" and "fdatasync()" are likely to work.
HD Associates, Inc. Software and System Engineering
This email is delivered through the public internet using protocols subject to interception and tampering.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 235 bytes
Desc: Message signed with OpenPGP
More information about the users