From ed@hoeg.nl  Tue Dec 12 09:55:30 2006
Return-Path: <ed@hoeg.nl>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 2CEEE16A416
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 12 Dec 2006 09:55:30 +0000 (UTC)
	(envelope-from ed@hoeg.nl)
Received: from palm.hoeg.nl (palm.hoeg.nl [83.98.131.212])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5501A43DB4
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 12 Dec 2006 09:53:08 +0000 (GMT)
	(envelope-from ed@hoeg.nl)
Received: by palm.hoeg.nl (Postfix, from userid 1000)
	id A9E241CF40; Tue, 12 Dec 2006 10:54:25 +0100 (CET)
Message-Id: <20061212095425.A9E241CF40@palm.hoeg.nl>
Date: Tue, 12 Dec 2006 10:54:25 +0100 (CET)
From: Ed Schouten <ed@fxq.nl>
Reply-To: Ed Schouten <ed@fxq.nl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: mountd(8) doesn't honor existing filesystem flags
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         106636
>Category:       bin
>Synopsis:       mountd(8) doesn't honor existing filesystem flags
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    yar
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 12 10:00:17 GMT 2006
>Closed-Date:    Thu Feb 14 17:09:15 UTC 2008
>Last-Modified:  Thu Feb 14 17:10:00 UTC 2008
>Originator:     Ed Schouten
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD palm.hoeg.nl 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Sun Dec 10 13:48:08 CET 2006 root@palm.hoeg.nl:/usr/obj/usr/src/sys/PALM i386
>Description:
A system I'm working on has two mounted filesystems: a read-only mounted
compact flash (/) and a read-write mounted harddisk (/disk). When I
start mountd with a very simple config:

/disk

mountd(8) remounts the filesystem as read-write.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->rink 
Responsible-Changed-By: rink 
Responsible-Changed-When: Tue Dec 12 10:12:56 UTC 2006 
Responsible-Changed-Why:  
I'll look into this; may be a side-effect of my mountd(8) flag-saving work. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106636 
State-Changed-From-To: open->feedback 
State-Changed-By: rink 
State-Changed-When: Mon Feb 11 14:29:34 UTC 2008 
State-Changed-Why:  
Is this issue still present? It appears not related to my work, but maybe 
due to the nmount(2) changes.. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106636 

From: Yar Tikhiy <yar@comp.chem.msu.su>
To: bug-followup@FreeBSD.org, ed@fxq.nl, rink@FreeBSD.org
Cc:  
Subject: Re: bin/106636: mountd(8) doesn't honor existing filesystem flags
Date: Tue, 12 Feb 2008 18:03:29 +0300

 In addition, if this bug is still there, it would be interesting
 to see whether the quick fix from PR kern/120319 helps.  If it does,
 the problem clearly is nmount(2) related.  Please refer to the audit
 trail in PR kern/120319 for the technical discussion.
 
 -- 
 Yar

From: Yar Tikhiy <yar@comp.chem.msu.su>
To: Ed Schouten <ed@fxq.nl>
Cc: rink@FreeBSD.org, bug-followup@FreeBSD.org
Subject: Re: bin/106636: mountd(8) doesn't honor existing filesystem flags
Date: Wed, 13 Feb 2008 20:55:09 +0300

 On Tue, Feb 12, 2008 at 04:24:14PM +0100, Ed Schouten wrote:
 > * rink@FreeBSD.org <rink@FreeBSD.org> wrote:
 > > Is this issue still present? It appears not related to my work, but maybe
 > > due to the nmount(2) changes..
 > 
 > I just tampered around on my workstation at the office, but for some
 > reason I cannot reproduce this issue anymore. When I start mountd, the
 > filesystem is left read-only.
 > 
 > Bugs seem to fix themselves, I guess... :-)
 
 ...but other bugs pop up to occupy the free space. :-)
 
 According to my tests, after mountd(8) was started in a setup similar
 to yours, it becomes impossible to remount / read-write.  I'm
 investigating this issue as I believe that we're hitting some kind of
 a rather general bug in the mount framework.
 
 -- 
 Yar

From: Yar Tikhiy <yar@comp.chem.msu.su>
To: Ed Schouten <ed@fxq.nl>
Cc: rink@FreeBSD.org, bug-followup@FreeBSD.org
Subject: Re: bin/106636: mountd(8) doesn't honor existing filesystem flags
Date: Thu, 14 Feb 2008 14:52:41 +0300

 On Wed, Feb 13, 2008 at 08:55:09PM +0300, Yar Tikhiy wrote:
 > 
 > According to my tests, after mountd(8) was started in a setup similar
 > to yours, it becomes impossible to remount / read-write.  I'm
 > investigating this issue as I believe that we're hitting some kind of
 > a rather general bug in the mount framework.
 
 The things are getting curiouser and curiouser, as Alice would put it. :-)
 Namely it appears that the said failure to remount / read-write
 doesn't result from the operation of mountd(8) as such.  Since
 mountd(8) was started, you can SIGSTOP it, or even kill it, but /
 will stay unremountable forever (i.e., until the reboot.)  This rules
 out the possibility that mountd(8) returns / to read-only mode when
 issuing nmount(2) syscalls upon a mount configuration change.
 
 -- 
 Yar
State-Changed-From-To: feedback->closed 
State-Changed-By: yar 
State-Changed-When: Thu Feb 14 17:05:56 UTC 2008 
State-Changed-Why:  
The cause of this problem proved to be the same as that of PR kern/120319. 
It will be handled in the latter PR.  Thanks! 


Responsible-Changed-From-To: rink->yar 
Responsible-Changed-By: yar 
Responsible-Changed-When: Thu Feb 14 17:05:56 UTC 2008 
Responsible-Changed-Why:  
I close this PR and want to see feedback. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106636 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/106636: commit references a PR
Date: Thu, 14 Feb 2008 17:04:38 +0000 (UTC)

 yar         2008-02-14 17:04:31 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/kern             vfs_mount.c 
   Log:
   In the new order of things dictated by nmount(2), a read-only mount
   is to be requested via a "ro" option.  At the same time, MNT_RDONLY
   is gradually becoming an indicator of the current state of the FS
   instead of a command flag.  Today passing MNT_RDONLY alone to the
   kernel's mount machinery will lead to various glitches.  (See the
   PRs for examples.)
   
   Therefore mount the root FS with a "ro" option instead of the
   MNT_RDONLY flag.  (Note that MNT_RDONLY still is added to the mount
   flags internally, by vfs_donmount(), if "ro" was specified.)
   
   To be able to pass "ro" cleanly to kernel_vmount(), teach the latter
   function to accept options with NULL values.
   
   Also correct the comment explaining how mount_arg() handles length
   of -1.
   
   PR:             bin/106636 kern/120319
   Submitted by:   Jaakko Heinonen <see PR kern/120319 for email> (originally)
   
   Revision  Changes    Path
   1.274     +4 -3      src/sys/kern/vfs_mount.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
