From owner-svn-src-head@FreeBSD.ORG Mon Jan 23 15:35:05 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2C79106566B; Mon, 23 Jan 2012 15:35:05 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by mx1.freebsd.org (Postfix) with ESMTP id 71A1D8FC0A; Mon, 23 Jan 2012 15:35:05 +0000 (UTC) Received: from a91-153-116-96.elisa-laajakaista.fi (a91-153-116-96.elisa-laajakaista.fi [91.153.116.96]) by gw02.mail.saunalahti.fi (Postfix) with SMTP id 4150B139E4A; Mon, 23 Jan 2012 17:34:58 +0200 (EET) Date: Mon, 23 Jan 2012 17:34:57 +0200 From: Jaakko Heinonen To: Mikolaj Golub Message-ID: <20120123153457.GA2246@a91-153-116-96.elisa-laajakaista.fi> References: <201201170125.q0H1PrlJ061058@svn.freebsd.org> <20120117171031.GA2316@a91-153-116-96.elisa-laajakaista.fi> <86obtvvr4v.fsf@kopusha.home.net> <20120122134218.GA2247@a91-153-116-96.elisa-laajakaista.fi> <86lioztzh5.fsf@kopusha.home.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86lioztzh5.fsf@kopusha.home.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, Kevin Lo , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r230252 - head/sys/fs/tmpfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jan 2012 15:35:05 -0000 On 2012-01-22, Mikolaj Golub wrote: > Also, may be we should allow remounting ro (and may be some othe options) for > tmpfs? Yes, the patch below does that. I suspect that flipping the MNT_RDONLY flag may be enough for tmpfs but I am not sure. > JH> %%% > JH> Index: sys/fs/tmpfs/tmpfs_vfsops.c > JH> =================================================================== > JH> --- sys/fs/tmpfs/tmpfs_vfsops.c (revision 230328) > JH> +++ sys/fs/tmpfs/tmpfs_vfsops.c (working copy) > JH> @@ -82,6 +82,10 @@ static const char *tmpfs_opts[] = { > JH> NULL > JH> }; > JH> > JH> +static const char *tmpfs_updateopts[] = { > JH> + "from", "export", NULL > JH> +}; > JH> + > JH> /* --------------------------------------------------------------------- */ > JH> > JH> static int > JH> @@ -150,12 +154,10 @@ tmpfs_mount(struct mount *mp) > JH> return (EINVAL); > JH> > JH> if (mp->mnt_flag & MNT_UPDATE) { > JH> - /* > JH> - * Only support update mounts for NFS export. > JH> - */ > JH> - if (vfs_flagopt(mp->mnt_optnew, "export", NULL, 0)) > JH> - return (0); > JH> - return (EOPNOTSUPP); > JH> + /* Only support update mounts for certain options. */ > JH> + if (vfs_filteropt(mp->mnt_optnew, tmpfs_updateopts) != 0) > JH> + return (EOPNOTSUPP); > JH> + return (0); > JH> } > JH> > JH> vn_lock(mp->mnt_vnodecovered, LK_SHARED | LK_RETRY); > JH> %%% -- Jaakko