From owner-freebsd-fs Sun Mar 5 22:39: 8 2000 Delivered-To: freebsd-fs@freebsd.org Received: from gatekeeper.tsc.tdk.com (gatekeeper.tsc.tdk.com [207.113.159.21]) by hub.freebsd.org (Postfix) with ESMTP id DCB2337BC15; Sun, 5 Mar 2000 22:39:05 -0800 (PST) (envelope-from gdonl@tsc.tdk.com) Received: from imap.gv.tsc.tdk.com (imap.gv.tsc.tdk.com [192.168.241.198]) by gatekeeper.tsc.tdk.com (8.8.8/8.8.8) with ESMTP id WAA02165; Sun, 5 Mar 2000 22:38:50 -0800 (PST) (envelope-from gdonl@tsc.tdk.com) Received: from salsa.gv.tsc.tdk.com (salsa.gv.tsc.tdk.com [192.168.241.194]) by imap.gv.tsc.tdk.com (8.9.3/8.9.3) with ESMTP id WAA41497; Sun, 5 Mar 2000 22:38:49 -0800 (PST) (envelope-from Don.Lewis@tsc.tdk.com) Received: (from gdonl@localhost) by salsa.gv.tsc.tdk.com (8.8.5/8.8.5) id WAA16092; Sun, 5 Mar 2000 22:38:40 -0800 (PST) From: Don Lewis Message-Id: <200003060638.WAA16092@salsa.gv.tsc.tdk.com> Date: Sun, 5 Mar 2000 22:38:37 -0800 In-Reply-To: <200003041934.LAA16343@flamingo.McKusick.COM> References: <200003041934.LAA16343@flamingo.McKusick.COM> X-Mailer: Mail User's Shell (7.2.6 beta(5) 10/07/98) To: Kirk McKusick , Alfred Perlstein Subject: Re: changing mount options still can cause damage? Cc: Terry Lambert , fs@FreeBSD.ORG, jkh@FreeBSD.ORG, Bruce Evans Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mar 4, 11:34am, Kirk McKusick wrote: } Subject: Re: changing mount options still can cause damage? } 2) In reviewing my bug logs for FFS I have found the `corruption' } case to which I believe the bug entry in the manual page was } alluding. It is possible to get lost inodes in a filesystem } that has been downgraded to read-only even if it never ran } in async mode. The senario causing trouble goes as follows: } } A) a process opens a file for reading. } B) the file is unlinked } C) the filesystem is downgraded to read-only } D) the process referencing the now unlinked } file exits or closes the file. } } In this case, the the inode cannot be freed as the filesystem } is now in read-only mode. Corruption of this sort is not } particularly threatening as the lost inodes will be cleaned } up the next time `fsck -p' is run, but the resulting loss } of space may be annoying if the filesystem is nearly full. } The alternative is to vgone files with link counts of zero } when doing a (forcible) downgrade just as we do with files } that are open for writing. This would result in the inode } being released and the process seeing a dead file (again } just as it would for a file open for writing). This seems } a slightly odd semantic for a file open for reading, so I } have not done it. Does anyone have any views on whether the } filesystem should be changed in this way on forcible } downgrades? This is probably OK when doing a forceable downgrade. A non-forceable downgrade should probably fail with EBUSY. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message