Subject: Re: Who's accessing my disk?
To: Jukka Marin <firstname.lastname@example.org>
From: Ken Hornstein <email@example.com>
Date: 02/08/1999 03:08:20
>Yes, I know what update is and why it does what it does. What I didn't know
>was why anything was "flushed to disk" when no data were being written to any
>file. The answer is that sync() updates the disk superblock timestamps
>even when no buffers are actually flushed to disk. So, as far as I
>understand, using async mount is currently the only way to keep the disk
Dambit, that's _not_ the behavior I saw when I was working on this.
The superblock timestamp only got updated when something else got
updated. From my memory (and a quick glance at the code), yes,
that's right ... the superblock only gets written back when
fs->fs_fmod is non-zero.
What I did to debug this was to print out the inode number of every
file that gets updated. You can put this code in /sys/ufs/ffs/ffs_vfsops.c
in ffs_sync(). Of course, this will make your kernel log file grow
:-) When you get the inode number (the appropriate filesystem will
probably be useful as well) then you can use find (-inum) to find
the right file, and that should get you going in the right direction.
You can also use -async, but that's mainly a big help when doing