[$] Hole punching races against page-cache filling
Filesystem developers tend to disagree with each other about many things,but they are nearly unanimous in their dislike for the truncate()system call, which chops data off the end of a file. Implementingtruncate() tends to be full of traps for the unwary - the kind oftraps that can lead to lost data. But it turns out that a similaroperation, called "hole punching", may be worse. This operation has beensubject to difficult-to-hit but real race conditions in many filesystemsfor years; thispatch set from Jan Kara may finally be at a point where it can fill thehole in hole punching.