Comment 42 for bug 817326

Revision history for this message
In , Tristan Schmelcher (tschmelcher) wrote :

Created attachment 55932
gdb trace of all the calls to close(2) when saving a document

Seems reasonable. I used gdb to find all the stacks that call close when saving a file (in 3.4.4, since I didn't have time to build my own package with symbols). There's a lot of calls (27), but most are very similar. Transfer_Impl indeed appears in several, and SfxMedium in almost all of them.

I noticed that some of the calls are for backing up stuff. Ideally the backup(s) should be fsync'ed too so that a usable backup will be present even if a power outage occurs in the middle of saving the real file, since copying is not atomic like rename is.