kern/105056: FS can not be remounted read-only, if a running process' executable was modified

Eric Anderson anderson at freebsd.org
Mon Mar 12 18:57:12 UTC 2007


On 03/12/07 09:25, Mikhail Teterin wrote:
> On Monday 12 March 2007 04:11, Remko Lodder wrote:
> = Hi Mikhail,
> = 
> = As far as I am aware, the filesystem can only be closed when the consumers
> = stopped consuming the disk. Perhaps we should move this discussion to -fs
> = to see what the FileSystem guru's think so that we know for sure?
> 
> Moving... Of course, the filesystem can only be closed, when the consumers 
> stop consuming. The point is, however, there are NO read-write consumers -- 
> and yet a read-only remount remains impossible.
> 
> The problem detailed in the PR is that locking an FS back down to read-only is 
> impossible, when earlier-started processes are still running, but have had 
> their executables overwritten.
> 
> The usual scenario, again, is:
> 
> 	* remount / read-write for `installworld' to succeed;
> 	* try to remount / back read-only, and fail...
> 
> Note, that no new "consumers" of the FS have started, or have they?..


This probably won't work because there is still meta-data that needs to 
be written once the open files are closed.  That is because a currently 
in-use (open) file was replaced, so the delete still needs to occur once 
the file is closed.  That pending delete is probably what is causing the 
fs to not allow it to be downgraded.


Eric


More information about the freebsd-fs mailing list