Subject: Re: Using tmpfs instead of mfs for "MAKEDEV -M"
To: None <tech-userlevel@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-userlevel
Date: 12/10/2007 09:47:57
On Sun, 09 Dec 2007, David Young wrote:
> > mount_tmpfs(8) seems to be quite stable, so I'd like to
> > start using it instead of mount_mfs(8) for "MAKEDEV -M".
>
> I don't know if it is important, but tmpfs does not provide whitespace,
> so mounting it -o union may not always work as one expects.
I didn't know that. I just tested this, and after the following commands
mkdir ./tmp
cp MAKEDEV ./tmp
mount_tmpfs -o union tmpfs $(pwd)/tmp
rm ./tmp/MAKEDEV
instead of a whiteout in the upper layer, the MAKEDEV in the lower layer
is removed. If the lower layer had been read-only, I assume that the rm
would have failed. Is this bug in tmpfs likely to be fixed soon?
Anyway, I don't think the lack of whiteouts in tmpfs is a serious issue
for the common use case, where the root file system contains a /dev
directory with a MAKEDEV script and nothing or very little else, and
init runs "MAKEDEV -MM init".
--apb (Alan Barrett)