From owner-freebsd-fs@FreeBSD.ORG Mon Feb 6 19:28:44 2012 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0B20106564A; Mon, 6 Feb 2012 19:28:44 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mail.vx.sk (mail.vx.sk [IPv6:2a01:4f8:150:6101::4]) by mx1.freebsd.org (Postfix) with ESMTP id A13A68FC12; Mon, 6 Feb 2012 19:28:44 +0000 (UTC) Received: from core2.vx.sk (localhost [127.0.0.2]) by mail.vx.sk (Postfix) with ESMTP id 0B978214C7; Mon, 6 Feb 2012 20:28:44 +0100 (CET) X-Virus-Scanned: amavisd-new at mail.vx.sk Received: from mail.vx.sk by core2.vx.sk (amavisd-new, unix socket) with LMTP id rsnRjvVRkekf; Mon, 6 Feb 2012 20:28:38 +0100 (CET) Received: from [10.9.8.1] (188-167-78-15.dynamic.chello.sk [188.167.78.15]) by mail.vx.sk (Postfix) with ESMTPSA id C1B05214B7; Mon, 6 Feb 2012 20:28:38 +0100 (CET) Message-ID: <4F3029E6.6000900@FreeBSD.org> Date: Mon, 06 Feb 2012 20:28:38 +0100 From: Martin Matuska User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0) Gecko/20120130 Thunderbird/10.0 MIME-Version: 1.0 To: Jaakko Heinonen References: <4F2F9CB9.3040000@FreeBSD.org> <20120206174016.GA2270@a91-153-116-96.elisa-laajakaista.fi> In-Reply-To: <20120206174016.GA2270@a91-153-116-96.elisa-laajakaista.fi> X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: freebsd-fs@FreeBSD.org Subject: Re: [CFR][DEVFS] Add "ruleset" mount option X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Feb 2012 19:28:45 -0000 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