* handling unrecognised mount options
@ 2003-03-16 11:00 Andrew Morton
2003-03-16 11:50 ` Andries Brouwer
0 siblings, 1 reply; 10+ messages in thread
From: Andrew Morton @ 2003-03-16 11:00 UTC (permalink / raw)
To: linux-fsdevel, ext2-devel
None of my machines will successfully boot into 2.4 kernels because I have
"commit=30" added to the ext3 mount options in /etc/fstab.
The ext3 driver in those kernels does not to recognise that option and it
fails the mount.
This seems to be a fairly gratuitous and pointless forward-incompatibility.
I propose that henceforth filesystems will, when presented with an
unrecognised mount option, warn and proceed with the mount anyway.
Can anyone see any problems with that?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: handling unrecognised mount options
2003-03-16 11:00 handling unrecognised mount options Andrew Morton
@ 2003-03-16 11:50 ` Andries Brouwer
2003-03-16 19:04 ` Randy.Dunlap
2003-03-16 22:46 ` Andrew Morton
0 siblings, 2 replies; 10+ messages in thread
From: Andries Brouwer @ 2003-03-16 11:50 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-fsdevel, ext2-devel
On Sun, Mar 16, 2003 at 03:00:03AM -0800, Andrew Morton wrote:
> None of my machines will successfully boot into 2.4 kernels because I have
> "commit=30" added to the ext3 mount options in /etc/fstab.
>
> The ext3 driver in those kernels does not to recognise that option and it
> fails the mount.
>
> This seems to be a fairly gratuitous and pointless forward-incompatibility.
>
> I propose that henceforth filesystems will, when presented with an
> unrecognised mount option, warn and proceed with the mount anyway.
>
> Can anyone see any problems with that?
I would prefer the conservative approach, doing the mount only
when also some "force" flag is present.
Mounting is a dangerous operation.
An incorrect mount can crash the kernel and can damage the filesystem.
Andries
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: handling unrecognised mount options
2003-03-16 11:50 ` Andries Brouwer
@ 2003-03-16 19:04 ` Randy.Dunlap
2003-03-16 22:46 ` Andrew Morton
1 sibling, 0 replies; 10+ messages in thread
From: Randy.Dunlap @ 2003-03-16 19:04 UTC (permalink / raw)
To: aebr; +Cc: akpm, linux-fsdevel, ext2-devel
> On Sun, Mar 16, 2003 at 03:00:03AM -0800, Andrew Morton wrote:
>
>> None of my machines will successfully boot into 2.4 kernels because I have
>> "commit=30" added to the ext3 mount options in /etc/fstab.
>>
>> The ext3 driver in those kernels does not to recognise that option and it
>> fails the mount.
>>
>> This seems to be a fairly gratuitous and pointless
>> forward-incompatibility.
>>
>> I propose that henceforth filesystems will, when presented with an
>> unrecognised mount option, warn and proceed with the mount anyway.
>>
>> Can anyone see any problems with that?
>
> I would prefer the conservative approach, doing the mount only
> when also some "force" flag is present.
>
> Mounting is a dangerous operation.
> An incorrect mount can crash the kernel and can damage the filesystem.
or drop into maintenance mode. Or is that what happens now?
or is that not possible?
~Randy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: handling unrecognised mount options
2003-03-16 11:50 ` Andries Brouwer
2003-03-16 19:04 ` Randy.Dunlap
@ 2003-03-16 22:46 ` Andrew Morton
2003-03-17 4:25 ` Szakacsits Szabolcs
1 sibling, 1 reply; 10+ messages in thread
From: Andrew Morton @ 2003-03-16 22:46 UTC (permalink / raw)
To: Andries Brouwer; +Cc: linux-fsdevel, ext2-devel
Andries Brouwer <aebr@win.tue.nl> wrote:
>
> On Sun, Mar 16, 2003 at 03:00:03AM -0800, Andrew Morton wrote:
>
> > None of my machines will successfully boot into 2.4 kernels because I have
> > "commit=30" added to the ext3 mount options in /etc/fstab.
> >
> > The ext3 driver in those kernels does not to recognise that option and it
> > fails the mount.
> >
> > This seems to be a fairly gratuitous and pointless forward-incompatibility.
> >
> > I propose that henceforth filesystems will, when presented with an
> > unrecognised mount option, warn and proceed with the mount anyway.
> >
> > Can anyone see any problems with that?
>
> I would prefer the conservative approach, doing the mount only
> when also some "force" flag is present.
>
> Mounting is a dangerous operation.
> An incorrect mount can crash the kernel and can damage the filesystem.
>
The only way we could have a problem here is if someone made a
back-incompatible change to a filesystem format which would cause problems
for older kernels. And then _required_ that newer kernel be given this mount
option.
I just cannot think of any other scenario in which the current behaviour
makes sense. And it is objectionable.
Certainly it does not make sense for ext2 and ext3 where we have
compatibility flags for these things. So I'm at least looking for an
argument aganst changing this behaviour for ext2/3.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: handling unrecognised mount options
2003-03-16 22:46 ` Andrew Morton
@ 2003-03-17 4:25 ` Szakacsits Szabolcs
2003-03-17 4:34 ` Andrew Morton
0 siblings, 1 reply; 10+ messages in thread
From: Szakacsits Szabolcs @ 2003-03-17 4:25 UTC (permalink / raw)
To: Andrew Morton; +Cc: Andries Brouwer, linux-fsdevel, ext2-devel
On Sun, 16 Mar 2003, Andrew Morton wrote:
> The only way we could have a problem here is if someone made a
> back-incompatible change to a filesystem format which would cause
> problems for older kernels. And then _required_ that newer kernel
> be given this mount option.
Explicitely, yes. Implicitely no when other parts of the system can
rely/depend on a mount option. From security compromise to implicitely
trashed data I can imagine anything. In those cases a warning could be
too late.
Another issue is predictibility. If one gives an option he expects the
driver to behave just like that. Long time convention.
Szaka
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: handling unrecognised mount options
2003-03-17 4:25 ` Szakacsits Szabolcs
@ 2003-03-17 4:34 ` Andrew Morton
2003-03-17 5:23 ` Szakacsits Szabolcs
0 siblings, 1 reply; 10+ messages in thread
From: Andrew Morton @ 2003-03-17 4:34 UTC (permalink / raw)
To: Szakacsits Szabolcs; +Cc: aebr, linux-fsdevel, ext2-devel
Szakacsits Szabolcs <szaka@sienet.hu> wrote:
>
> Another issue is predictibility. If one gives an option he expects the
> driver to behave just like that. Long time convention.
>
OK, I'll buy that one.
Now what about the inability to switch between kernels?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: handling unrecognised mount options
2003-03-17 4:34 ` Andrew Morton
@ 2003-03-17 5:23 ` Szakacsits Szabolcs
2003-03-17 5:32 ` Andrew Morton
0 siblings, 1 reply; 10+ messages in thread
From: Szakacsits Szabolcs @ 2003-03-17 5:23 UTC (permalink / raw)
To: Andrew Morton; +Cc: aebr, linux-fsdevel, ext2-devel
On Sun, 16 Mar 2003, Andrew Morton wrote:
>
> Now what about the inability to switch between kernels?
1) "force" mount
2) [re]mount with the feature if supported by the kernel
Szaka
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: handling unrecognised mount options
2003-03-17 5:23 ` Szakacsits Szabolcs
@ 2003-03-17 5:32 ` Andrew Morton
2003-03-17 9:18 ` Andries Brouwer
0 siblings, 1 reply; 10+ messages in thread
From: Andrew Morton @ 2003-03-17 5:32 UTC (permalink / raw)
To: Szakacsits Szabolcs; +Cc: aebr, linux-fsdevel, ext2-devel
Szakacsits Szabolcs <szaka@sienet.hu> wrote:
>
>
> On Sun, 16 Mar 2003, Andrew Morton wrote:
> >
> > Now what about the inability to switch between kernels?
>
> 1) "force" mount
By changing initscripts? That defeats the whole idea.
> 2) [re]mount with the feature if supported by the kernel
Yeah, well. That's what I'm doing at present in rc.local. It's
pretty lame.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: handling unrecognised mount options
2003-03-17 5:32 ` Andrew Morton
@ 2003-03-17 9:18 ` Andries Brouwer
2003-03-17 16:54 ` Bryan Henderson
0 siblings, 1 reply; 10+ messages in thread
From: Andries Brouwer @ 2003-03-17 9:18 UTC (permalink / raw)
To: Andrew Morton; +Cc: Szakacsits Szabolcs, linux-fsdevel, ext2-devel
On Sun, Mar 16, 2003 at 09:32:27PM -0800, Andrew Morton wrote:
> Szakacsits Szabolcs <szaka@sienet.hu> wrote:
>
> > 2) [re]mount with the feature if supported by the kernel
>
> Yeah, well. That's what I'm doing at present in rc.local. It's
> pretty lame.
(i) testing kernel version is often required:
Of course one hopes that initscripts can be independent
of the kernel version. But usually they cannot.
Today 2.4.20 and 2.5.64 number my ethernet cards differently,
so the network scripts have to depend on kernel version.
The use of ipfwadm / ipchains / iptables depends on kernel version.
In the course of time I have seen lp0 and lp1 being interchanged,
the numbering of partitions changed (with BSD slices after all
DOS-type partitions) etc.
(ii) mounting a filesystem may be dangerous for the kernel:
Many filesystem implementations do not check everything read from disk
but just use this data. If the disk filesystem is corrupt, or if the
filesystem was mounted with the wrong type this can cause kernel
corruption.
(iii) mounting a filesystem may be dangerous for the filesystem:
Clearly, if the kernel writes to the filesystem and is mistaken
about its type, the filesystem can be corrupted.
(iv) mount options given help determining filesystem type and semantics
In "mount -t ufs -o ufstype=sunx86" the filesystem type is
determined by an option. Certainly one should not ignore this
option on old kernels where it is not implemented.
In "mount -t vfat -o gid=15" mount permissions are defined.
Certainly one should not ignore this option on old kernels
where it is not implemented.
In "mount -t ext2 -o grpid" semantics for the group ID of
newly created files is defined. Etc.
(v) users are lazy
Of course everybody should always define the filesystem type
when giving a mount command. But people prefer to type as
little as possible, and let mount do the probing.
This means that "mount dev /dir -o errors=remount-ro"
only considers filesystem types where "errors=remount-ro"
is a known option. And "mount dev /dir -o gid=15"
will only consider filesystem types where "gid=15"
is a known option. Ignoring unknown options makes this
dangerous probing a little bit more dangerous.
In your particular situation ignoring this unknown option
may be harmless. But in general it is not.
Andries
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: handling unrecognised mount options
2003-03-17 9:18 ` Andries Brouwer
@ 2003-03-17 16:54 ` Bryan Henderson
0 siblings, 0 replies; 10+ messages in thread
From: Bryan Henderson @ 2003-03-17 16:54 UTC (permalink / raw)
To: Andries Brouwer
Cc: Andrew Morton, ext2-devel, linux-fsdevel, Szakacsits Szabolcs
I've never seen this done in string format option specifications, but in
more machine-oriented formats, I often address this requirement by defining
two sets of reserved option flags: ones that are mandatory and ones that
are effectively suggestions. If the code doesn't recognize one of the
mandatory flags, it has to fail and say, "whatever you're asking for, I
don't know how to do it." If the code doesn't recognize one of the
suggestion flags, it just ignores it, maybe with a warning.
Something like that could be worked into the syntax of mount options.
The developer can also leave the decision up to the user by adding both
versions of the new option -- one mandatory, and one suggestion.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2003-03-17 16:54 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-16 11:00 handling unrecognised mount options Andrew Morton
2003-03-16 11:50 ` Andries Brouwer
2003-03-16 19:04 ` Randy.Dunlap
2003-03-16 22:46 ` Andrew Morton
2003-03-17 4:25 ` Szakacsits Szabolcs
2003-03-17 4:34 ` Andrew Morton
2003-03-17 5:23 ` Szakacsits Szabolcs
2003-03-17 5:32 ` Andrew Morton
2003-03-17 9:18 ` Andries Brouwer
2003-03-17 16:54 ` Bryan Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox