From owner-freebsd-current Mon Apr 26 12:18:11 1999 Delivered-To: freebsd-current@freebsd.org Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.54]) by hub.freebsd.org (Postfix) with ESMTP id 7132514A09 for ; Mon, 26 Apr 1999 12:18:02 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.9.3/8.9.1) id MAA82637; Mon, 26 Apr 1999 12:15:21 -0700 (PDT) (envelope-from sgk) From: Steve Kargl Message-Id: <199904261915.MAA82637@troutmask.apl.washington.edu> Subject: Re: file disappeared? In-Reply-To: <199904261858.NAA21791@argus.tfs.net> from Jim Bryant at "Apr 26, 1999 01:58:44 pm" To: jbryant@unix.tfs.net Date: Mon, 26 Apr 1999 12:15:21 -0700 (PDT) Cc: freebsd-current@freebsd.org X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jim Bryant wrote: > In reply: > > Can VFS_STATFS return a value that indicates whether a file system > > is mounted? If so, it would seem logical to have fsck check the status. > > > > status = VFS_STATFS(mp, sbp, p); > > if (status & MOUNTED) > > perror("file system mounted"); > > I am saying this without having looked at the code first, but I > believe that it is already impossible to umount a filesystem with any > OPEN files on it: "filesystem in use". Assuming that all of the > buffers are flushed upon close, the only thing you really should get > is a clean flag problem, as would happen in a crash on a filesystem > with no open files. > I wasn't clear in my response. Running "fsck -p" on a mounted file system can supposedly lead to Bad Things. It seems that fsck should determine if the file systm is mounted before it can to some damage. -- Steve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message