Linux filesystem development
 help / color / mirror / Atom feed
From: Andries Brouwer <aebr@win.tue.nl>
To: Andrew Morton <akpm@digeo.com>
Cc: Szakacsits Szabolcs <szaka@sienet.hu>,
	linux-fsdevel@vger.kernel.org, ext2-devel@lists.sourceforge.net
Subject: Re: handling unrecognised mount options
Date: Mon, 17 Mar 2003 10:18:47 +0100	[thread overview]
Message-ID: <20030317091847.GA7977@win.tue.nl> (raw)
In-Reply-To: <20030316213227.1ce61c77.akpm@digeo.com>

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

  reply	other threads:[~2003-03-17  9:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2003-03-17 16:54               ` Bryan Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030317091847.GA7977@win.tue.nl \
    --to=aebr@win.tue.nl \
    --cc=akpm@digeo.com \
    --cc=ext2-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=szaka@sienet.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox