4 ms·
> While snapshot reduces file corruptions, it is not a guarantee the best I understand. The idea is that you'll only encounter corruptions that the application
by a1369209993 4y ago
> While snapshot reduces file corruptions, it is not a guarantee the best I understand.
The idea is that you'll only encounter corruptions that the application could already hit due to crashes or power outages (and hence hopefully supports recovering from). For example, with naive reads, you might:
read the first half of the file
context switch to the application
application writes to the first half of the file
application fsyncs previous writes
application writes to the second half of the file
context switch back to you
read the second half of the file
and end up with data in the second half of the file that the application normally only writes after it's sure that corresponding data has been written to the first half.