Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Feb 2012 20:28:38 +0100
From:      Martin Matuska <mm@FreeBSD.org>
To:        Jaakko Heinonen <jh@FreeBSD.org>
Cc:        freebsd-fs@FreeBSD.org
Subject:   Re: [CFR][DEVFS] Add "ruleset" mount option
Message-ID:  <4F3029E6.6000900@FreeBSD.org>
In-Reply-To: <20120206174016.GA2270@a91-153-116-96.elisa-laajakaista.fi>
References:  <4F2F9CB9.3040000@FreeBSD.org> <20120206174016.GA2270@a91-153-116-96.elisa-laajakaista.fi>

next in thread | previous in thread | raw e-mail | index | archive | help
Dňa 6.2.2012 18:40, Jaakko Heinonen wrote / napísal(a):
> On 2012-02-06, Martin Matuska wrote:
>> The attached patch adds a "ruleset" mount option to devfs mounts.
>> +	if (mp->mnt_optnew != NULL &&
>> +	    vfs_getopt(mp->mnt_optnew, "ruleset", NULL, NULL) == 0) {
>> +		if (vfs_scanopt(mp->mnt_optnew, "ruleset", "%d",
>> +		    &rsnum) != 1) {
>> +			vfs_mount_error(mp, "%s",
>> +			    "invalid ruleset specification");
>> +			return (EINVAL);
>> +		}
>> +	}
> The "ruleset" mount option will persist after the devfs_mount() call. It
> will get out of sync if the ruleset is later changed with the devfs
> command.
It is not displayed in mount -v / -p and is not used anywhere on
existing mounts, devfs_mount() doesn't support MNT_UPDATE.
If we would add update support than we still wouldn't rely on this
option as it would be read from devfs.
> devfs_mount() seems to miss a vfs_filteropt(9) call.
There wasn't a vfs_filteropt(9) before, too. I can not tell whether this
is desired, but what I can tell if you introduce a vfs_filteropt you
change the behavior of mounting devfs.
Maybe it is desired, but this is something open for discussion, I do not
feel privileged to decide alone what options are to be allowed
(readonly, noatime, nosymfollow, etc.). As a minimum, you need the
"from" option allowed. This may very well break backwards compatibility.



-- 
Martin Matuska
FreeBSD committer
http://blog.vx.sk




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F3029E6.6000900>