Date: Sat, 24 Jan 2004 20:44:35 +0100 From: Radim Kolar <hsn@netmag.cz> To: FreeBSD-gnats-submit@FreeBSD.org Cc: obrien@FreeBSD.org Subject: ports/61901: editors/vim: file loss with softupdates Message-ID: <E1AkThr-0000ou-R1@asura.bsd> Resent-Message-ID: <200401251840.i0PIe5Ql052225@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 61901 >Category: ports >Synopsis: editors/vim: file loss with softupdates >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jan 25 10:40:05 PST 2004 >Closed-Date: >Last-Modified: >Originator: Radim Kolar >Release: FreeBSD 5.2-RELEASE i386 >Organization: Sanatana Dharma >Environment: System: FreeBSD asura.bsd 5.2-RELEASE FreeBSD 5.2-RELEASE #0: Thu Jan 15 18:35:03 CET 2004 root@asura.bsd:/usr/obj/usr/src/sys/GENERIC i386 >Description: There is a problem when using Vim on volume with softupdates. Problem is not in softupdates itself. It happens on reiserfs, jfs, ntfs drives also. You will got file with random data on them. Vim uses following method for saving files: unlink file.txt~ ren file.txt -> file.txt~ open file.txt , "w" write close chmod (file.txt) unlink (file.txt~) >How-To-Repeat: i have vim 6.2.154 cat > testme.txt vim testme.txt edit that :x press reset button, if correctly timed, you will loose that file. Not too hard to get a 'correct' timing. >Fix: as workaround place fsync() call into vim's file saving code. This will not hurt performance too much. Better is to modify VIM's saving code: open ('file.txt~','w') write+close. rename ('file.txt~ -> file.txt) chmod, ... Report this bug to upstream VIM's authors. This bug is not freebsd specific. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1AkThr-0000ou-R1>