116 reputation
2
bio website bikeshedder.com
location Germany
age
visits member for 1 year, 7 months
seen Jul 29 at 18:37

Apr
13
comment File goes missing for a short period of time after saving it using VIM
Still I don't get why VIM reports the file as written when in fact it is not? I even experienced this issue when working with two terminals: one VIM the other where I start the a compiler or another application by hand. VIM reports the file as being written while the other app returns a "no such file or directory" error. I guess I will have to open a bug in VIM for this. I'm just curious as I seam to be the only one affected by this so far.
Apr
13
comment File goes missing for a short period of time after saving it using VIM
Since writing this question I have switched to dm-crypt with LUKS and this problem is no longer as prevalent as it used to be. After digging into the VIM manual I found the backupcopy option which explains the behavior you found using strace. When switching to backupcopy=yes that rename no longer happens. Sadly the write is not atomic either. For me the best sequence for writing a file would be: 1.) write new file with a temporary name 2.) create hardlink of the original file if possible (copy it if this is not possible) 3.) rename new file to the target filename.
Mar
16
awarded  Supporter
Feb
12
comment File goes missing for a short period of time after saving it using VIM
You are probably right. Bug filed: bugs.launchpad.net/ecryptfs/+bug/1123267
Feb
12
comment File goes missing for a short period of time after saving it using VIM
Even if the file is not immediately written to the disk (I have not set the VIM fsync option) it should be instantly available via the Linux VFS. The linked bug is an interesting read but is probably not related to my issue. btw. I'm probably going to switch to dm-crypt/LUKS in foreseeable future. TrueCrypt is a no-go for me because of its rather weird license.
Feb
12
awarded  Student
Feb
12
asked File goes missing for a short period of time after saving it using VIM