[comp.unix.wizards] Syncing inodes in 4.3 BSD

brankley@usfvax1.UUCP (Bob Brankley ) (04/06/88)

In article <271@usfvax1.UUCP>, brankley@usfvax1.UUCP (Bob Brankley) writes:
> 
> It seems that 4.3 BSD is not periodically syncing in core inodes out to
> disk, resulting in crashes.
> ... 
> I originally found the problem when my nightly "fsck" of the file system
> detected multiple UNREFerenced files ...

First of all I would like to thank all of those who responded to my original
posting.  Yes, I do (NOW) realize that you should not run fsck on a
mounted file system.  One of my local friends told me about that.  That
is how I came about looking for incore inodes.

Let me rephrase this as a question.  Just how often is the kernal
supposed to sync incore inodes that belong to deleted files? The inodes
I have problems with belong to files that have not been running/nor have
existed for DAYS.  My concern is that IF the machine crashes these files
WILL BE truly unreferenced.  Do sync(2) and update(8) flush old incore
inodes? If not, who does? Are incore inodes supposed to be flushed
immediately after the file they reference is removed and has each
instance out of memory?  Why does this not seem to happen on my 4.2
(SunOS 3.5) SUN's?

Once again, I would like to thank all who reply ahead of time.


Bob Brankley
University of South Florida, Engineering Computer Services
CSNET:  usfvax1!brankley@usf.edu
UUCP:   {ihnp4!codas, gatech}!usfvax2!usfvax1!brankley

chris@mimsy.UUCP (Chris Torek) (04/06/88)

In article <276@usfvax1.UUCP> brankley@usfvax1.UUCP (Bob Brankley ) writes:
>Let me rephrase this as a question.  Just how often is the kernal
>supposed to sync incore inodes that belong to deleted files?

As long as the file is still open, never.  That is, the inode will
appear `unreferenced' but since its i_count is nonzero (even though
its i_nlink is 0), someone is using it.

This is probably what is happening.

>... IF the machine crashes these files WILL BE truly unreferenced.

and fsck will remove them and everything will be happy.

(On the other hand, maybe your kernel has a bug.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris