[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/52056: mount -u / causes a kernel assertion
In messages related to PR kern/52056 (in gnats) and on firstname.lastname@example.org
(I am adding current-users as this needs opinions from a wider community).
The PR is mostly about kernel issues, this issue with mount -u is only
relevant because that happened to trigger the kernel, if -u worked
differently, the actual problem from the PR might not have been noticed.
Date: Fri, 10 Mar 2017 15:00:13 +0100
From: =?UTF-8?B?SmFyb23DrXIgRG9sZcSNZWs=?= <jaromir.dolecek%gmail.com@localhost>
| Some volunteer for checking why the -u doesn't work as advertized?
The issue is that the man page (mount(8)) says that -u takes options from
fstab, then the command line -o options, and then -r or -w - but the code
does not do that, fstab options are ignored with -u, only options from the
command line are used.
It kind of seems to be deliberate - though I have no idea why.
Back in the early days (until mid 1994) it seems to have worked as the
man page states - the relevant text in the man page has been essentially
unchanged since version 1.1. When 4.4-lite was incorporated in June 1994
the code changed, and the following lines appeared ...
/* If it's an update, ignore the fstab file options. */
fs->fs_mntops = NULL;
(in the code processing the -u case). The code was restructured in 1998,
but this was not altered in substance - the comment was deleted though.
It has remained essentially unchanged ever since.
So, it appears that 4.4-lite made this change, and apparently intentionally,
but I have no idea why.
Changing it is trivial, if that is desired. The question now is, which
should be fixed, the man page, or the code?
One last thing that's interesting, back in Nov 1997, a correction to the
man page has this as its commit log message ...
Add a clarification how the missing data are looked up if either
mount source or target are omitted. Adresses PR 3240.
XXX This is not the complete truth. Things change with the -u
option. Should be fixed in "mount.c".
The actual change that commit made is not relevant here, but the XXX
note indicates that way back then this issue was known, and at least one
developer thought it should be fixed in the source.
So, does anyone believe that we should change the man page, and note that
options from fstab are ignored with -u, or should the code be changed so
that it works as the man page has (always) advertised (but which it hasn't
done for the past (almost) 23 years.)
Main Index |
Thread Index |