Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Mar 2000 15:14:52 -0800
From:      Kirk McKusick <mckusick@flamingo.McKusick.COM>
To:        Erez Zadok <ezk@cs.columbia.edu>
Cc:        Alfred Perlstein <bright@wintelcom.net>, 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:  <200003062314.PAA16884@flamingo.McKusick.COM>
In-Reply-To: Your message of "Sun, 05 Mar 2000 14:12:30 EST." <200003051912.OAA01726@shekel.mcl.cs.columbia.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
	Date: Sun, 5 Mar 2000 14:12:30 -0500 (EST)
	From: Erez Zadok <ezk@cs.columbia.edu>
	To: Kirk McKusick <mckusick@flamingo.McKusick.COM>
	Cc: Alfred Perlstein <bright@wintelcom.net>,
	    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? 
	In-reply-to: Your message of "Sat, 04 Mar 2000 11:34:00 PST."
		     <200003041934.LAA16343@flamingo.McKusick.COM> 

	In message <200003041934.LAA16343@flamingo.McKusick.COM>,
	Kirk McKusick writes:
	[...]
	> 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?
	> 
	> 	Kirk

	Traditionally Unix file systems had all kind of odd semantics,
	but were considered reliable and stable.  So *if* I had to
	choose b/t adding some odd semantics and keeping the f/s
	clean, I'd go for cleanliness.

	If, however, there is no clear winning option, then the
	next best thing would be to do one of the following:

	(1) add a new mount flag that can select among the choices.
	    This option could be added to the mount(2) when it's
	    doing a remount.  We can select some default behavior
	    for the flag, and let users turn it off if they want.

	(2) print some console message from there kernel upon remount,
	    warning of any known open+unlinked files.

	BTW, can one remount read-only a f/s that's already remounted
	read-only? One (true hack) might be to keep the current
	remount semantics the same, but change them upon a second
	read-only remount.

	Erez.

In contemplating these choices, I am inclined away from special
mount flags or double remounting, as I think it would be hard to
describe to a non-techinical person what these flags meant beyond
down-grade cleanly and down-grade broken. The more I think about
it the more I am inclined to say that non-forcible down-grade
should fail if there are files open for writing or files open
for reading with zero nlink counts. If a forcible downgrade is
done, then all of these are vgone'd and the filesystem will be
clean as a result. I had contemplated adding a -F (very forcible)
unmount which unmounts without doing any additional I/O operations.
Obviously such a filesystem would be dirty, but it would be
useful if the disk (or NFS server) had died, and you just wanted
the mount gone. But short of such an option, I think that a
downgrade should leave the filesystem clean.

	Kirk


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?200003062314.PAA16884>