RFC: use of mdmfs "new" options in fstab
Oliver Fromme
olli at lurza.secnetix.de
Tue Oct 10 08:21:32 PDT 2006
This email is a bit old, but nobody else has commented,
so ...
Matteo Riondato wrote:
> During the years, mdmfs(8) has got many options which are not
> available in the "mount_mfs" compatibility mode (activated by
> specifing -C on the command line or by calling mount_mfs).
>
> This means that it's impossible to use mdmfs "new" option in fstab,
> which is quite limiting.
Yes, it's a real PITA. For example, I would like to mount
several memory file systems from within fstab, but I don't
need nor want soft-updates. Howver, the -S option is not
available for mount_mfs.
(On a related note, I also don't want the .snap directory
to appear on those memory file systems. newfs(8) has the
-n option to suppress it, but mdmfs doesn't.)
> I think there are two possibilities to solve this:
>
> 1) install mdmfs as mount_md (or mount_$something) and teach mount to
> recognize it. See attached mdmfsmakefile_mount.c.diff . This will
> allow to specify the following line in fstab (the -P option is not
> available in compatability mode):
>
> md /usr/jail/jail1 md ro,-P,-F/usr/jailmd/jail1.md 0 0
>
> 2)disable bug-for-bug compatibility with mount_mfs when the
> program name is "mount_mfs" or "mfs". The "-C" otion will still be
> available for those who want compatibility. See attached
> mdmfs.c.diff .
>
> I would prefer option #2, but any comment is really appreciated.
Personally, I would love to see #2 committed (and MFCed).
There's only one thing which could cause breakage: When
mdmfs is called as mount_mfs (hence -C is implied), the
option -p 1777 is the default, which is appropriate for
/tmp. People who have mount_mfs in their fstab and
expect that default behaviour will be surprised to see
that their /tmp suddenly isn't mode 1777 anymore.
Therefore I propose that your patch #2 be slightly
modified: When mdmfs is called as mount_mfs, don't
imply -C (hence all options are available), but do
imply -p 1777. Then it shouldn't break any existing
usages, as far as I can imagine.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.
PI:
int f[9814],b,c=9814,g,i;long a=1e4,d,e,h;
main(){for(;b=c,c-=14;i=printf("%04d",e+d/a),e=d%a)
while(g=--b*2)d=h*b+a*(i?f[b]:a/5),h=d/--g,f[b]=d%g;}
More information about the freebsd-arch
mailing list