Date: Sun, 5 Mar 2000 22:38:37 -0800 From: Don Lewis <Don.Lewis@tsc.tdk.com> To: Kirk McKusick <mckusick@flamingo.McKusick.COM>, Alfred Perlstein <bright@wintelcom.net> Cc: Terry Lambert <tlambert@primenet.com>, fs@FreeBSD.ORG, jkh@FreeBSD.ORG, Bruce Evans <bde@zeta.org.au> Subject: Re: changing mount options still can cause damage? Message-ID: <200003060638.WAA16092@salsa.gv.tsc.tdk.com> In-Reply-To: <200003041934.LAA16343@flamingo.McKusick.COM> References: <200003041934.LAA16343@flamingo.McKusick.COM>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003060638.WAA16092>