3 ms·
Here is a related question that has been on my mind for a while, but I have yet to find a good answer for: If I write to file on a reasonably recent Linux and
by weinzierl 2y ago
Here is a related question that has been on my mind for a while, but I have yet to find a good answer for:
If I write to file on a reasonably recent Linux and a sane file system like ext or zfs, at which point do I have the guarantee that when I read the same file back, that it is consistent and complete?
Do I really need to fsync or is Linux smart enough to give me back the buffer cache? Does it make a difference if reader and and writer are in the same thread or same process?
- fanf2 2y agoNormally, immediately when write(2) returns. It’s more complicated if the computer shut down in between, depending on how clean the shutdown was.