Package: vim
Version: 6.3-058+1

Every time, I save my file in vim (with ':w'), my harddrive is flushed:

  Jan 28 11:43:10 sybille kernel: vim(3283): dirtied inode 3702891 
(vim.flush.swp) on hde1
  Jan 28 11:43:55 sybille kernel: vim(3283): dirtied inode 10569207 (?) on hde1
  Jan 28 11:43:55 sybille kernel: vim(3283): dirtied inode 10567874 (tmp) on 
hde1
  Jan 28 11:43:55 sybille kernel: vim(3283): dirtied inode 10567874 (tmp) on 
hde1
  Jan 28 11:43:55 sybille kernel: vim(3283): READ block 169082880 on hde1
  Jan 28 11:43:55 sybille kernel: vim(3283): WRITE block 169168416 on hde1
  Jan 28 11:43:55 sybille kernel: vim(3283): WRITE block 169083272 on hde1
  Jan 28 11:43:55 sybille kernel: vim(3283): dirtied inode 10569207 (vim.flush) 
on hde1

Since I use 'laptop_mode', I want my harddrive to spin down, but saving with 
vim prevents this.
In the changelog (/usr/share/doc/vim/html/version6.html) I have found the 
following entry:

  Patch 6.2.499
  Problem:    When writing a file and halting the system, the file might be lost
              when using a journalling file system.
  Solution:   Use fsync() to flush the file data to disk after writing a file.
              (Radim Kolar)
  Files:            src/fileio.c

First I think this is not something vim has to bother about, but the 
bdflush-daemon. Second I use ext2, so since I use no journaling file system the 
fsync() command is not necessary.

I have also searched for an option to turn the flushing off, but I have found 
only 'swapsync' for the swapfile, nothing for the normal file.

Greetings
Diether Knof

P.S.
Part of my vimrc:

set swapsync=
set updatecount=200
set updatetime=6000
set backupdir=~/.vim/tmp/
set directory=~/.vim/tmp/
set hidden
set nobackup

Attachment: signature.asc
Description: Digital signature

Reply via email to