*BSD News Article 21686


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!uunet!news.univie.ac.at!fstgds15.tu-graz.ac.at!fstgds01.tu-graz.ac.at!not-for-mail
From: chmr@edvz.tu-graz.ac.at (Christoph Robitschko)
Newsgroups: comp.os.386bsd.questions
Subject: Re: what is fs_clean for?
Date: 30 Sep 1993 20:18:23 +0100
Organization: Technical University of Graz, Austria
Lines: 33
Message-ID: <28fbdvINNl2e@fstgds01.tu-graz.ac.at>
References: <28da76$fhf@acsc.com> <wilko.749384609@spoetnix.idca.tds.philips.nl>
NNTP-Posting-Host: fstgds01.tu-graz.ac.at
X-Newsreader: TIN [version 1.2 PL1]

In article <wilko.749384609@spoetnix.idca.tds.philips.nl> Wilko Bulte (wilko@idca.tds.philips.nl) wrote:
> jerry@acsc.com (Jerry Chen) writes:

> >In the superblock of UFS, there are two fields:

> >ufs/fs.h:       char    fs_clean;               /* file system is clean flag */
> >ufs/fs.h:       long    fs_state;               /* validate fs_clean field */

> >My guess is that they are used to determine if the file system is clean, ie, umounted
> >successfully.  And if the file system is clean, we do not need to fsck it since
> >life is too short to always run fsck.

> You're guess is right. SysV uses this since ages (?), so does DEC OSF/1,
> which uses the ufs filesystem. fsck -p checks if the fs is clean, and skips
> it if it is. You need to modify both fsck, (u)mount in the ufs code. I've
> been thinking about it myself, and it should not be a big issue I think.

> Haven't found time to do it myself.

I did it some time ago, (and I heard there are others as well), but you
also have to modify the reboot routine in the kernel, because it currently
does not unmount the filesystems, but only sync them.

There should also be a way to check the filesystems automatically after
some number of mounts (like Ultrix does it), so tunefs has to be modified
to set such a threshold.
There should also be a way to forcibly mount a "dirty" filesystem
(e.g. OSF/1 needs this to mount an ULTRIX CDROM).


								Christoph

PS.: If you want my patches, mail me and I'll see if I can dig them up.