Index | Thread | Search

From:
Martin Pieuchot <mpi@grenadille.net>
Subject:
Re: mount(2) fixes
To:
Helg <helg-openbsd@gmx.de>
Cc:
Crystal Kolipe <kolipe.c@exoticsilicon.com>, tech@openbsd.org
Date:
Thu, 20 Nov 2025 08:37:47 +0000

Download raw body.

Thread
On 20/11/25(Thu) 08:12, Helg wrote:
> On Wed, Nov 19, 2025 at 05:47:00PM +0000, Crystal Kolipe wrote:
> > Fix a couple of bugs in mount(2):
> > 
> > 
> > 1. The manual page contains the following text:
> > 
> > "For example, most filesystems will not allow a change from read-write to
> >  read-only."
> > 
> > As far as I can tell, this text was added in 4.3BSD-Reno and propogated to
> > OpenBSD via the initial import of the NetBSD tree.
> > 
> > In fact, all of ffs, mfs, tmpfs, ext2fs, and msdosfs allow re-mounting as
> > read-only.
> > 
> > (At least they do via the mount syscall, separately /sbin/mount fails when
> >  given an mfs filesystem as an argument along with -u because it doesn't
> >  understand the 'mfs:*' device string, but that's a separate issue.)
> > 
> > ISO9660, UDF, and ntfs are read-only implementations anyway, so there is no
> > concept of re-mounting from read-write to read-only.
> > 
> > So the idea that _most_ filesystems don't allow a change from read-write to
> > read-only is now clearly outdated.  Let's just remove the example.
> 
> I believe there are some problems with vnode leaking if you remount a
> file system, so there might be some caveates. Others here might know
> more.

I'd consider such issues as bugs that should be fixed.  If you have a
reproducer, please send a report to bugs@.