xfs
[Top] [All Lists]

Re: vim file write mode on journaling fs.

To: Bram Moolenaar <Bram@xxxxxxxxxxxxx>
Subject: Re: vim file write mode on journaling fs.
From: Eric Sandeen <sandeen@xxxxxxx>
Date: Sat, 11 Aug 2001 16:59:19 -0500
Cc: Russell Cattelan <cattelan@xxxxxxxxxxx>, Seth Mos <knuffie@xxxxxxxxx>, Linux XFS Mailing List <linux-xfs@xxxxxxxxxxx>
References: <200108111042.f7BAgLt00682@moolenaar.net>
Sender: owner-linux-xfs@xxxxxxxxxxx
Bram Moolenaar wrote:
> 
> Russell Cattelan wrote:
> 
> > > The following script was used.
> > >
> > > #!/bin/sh
> > > echo Test > file1
> > > cp file1 file2
> > > rm file1

> I'm glad Seth found an example with basic commands which shows Vim isn't
> really doing something strange.
<snip> 
> Summary: I consider this to be a problem with the filesystem, not with Vim.
> For people that want to be sure their file is synced, the ":!sync" command can
> be used.

I'll chime in and say I never thought vim was doing anything strange...
:)

However... regarding broken filesystems... let's try this with ext2:

[root@lite /root]# cat testit 
#!/bin/sh
mke2fs -q /dev/sda2
mount /dev/sda2 /mnt/sda2
echo Test > /mnt/sda2/file1
cp /mnt/sda2/file1 /mnt/sda2/file2
rm /mnt/sda2/file1
[root@lite /root]# ./testit
[root@lite /root]# ls -aR /mnt/sda2
/mnt/sda2:
.  ..  file2  lost+found

/mnt/sda2/lost+found:
.  ..

<wait 20 seconds>
<pull plug>
<reboot>
[root@lite /root]# e2fck /dev/sda2
e2fsck 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
/dev/sda2 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda2: 11/340032 files (0.0% non-contiguous), 10685/678746 blocks
[root@lite /root]# mount /dev/sda2 /mnt/sda2
[root@lite /root]# ls -aR /mnt/sda2
/mnt/sda2:
.  ..  lost+found

/mnt/sda2/lost+found:
.  ..


Nada... zip... zilch...

Hey, at least with XFS you get to see a filename.  :)

-- 
Eric Sandeen      XFS for Linux     http://oss.sgi.com/projects/xfs
sandeen@xxxxxxx   SGI, Inc.


<Prev in Thread] Current Thread [Next in Thread>