From rhh@ipass.net Sun Aug 15 12:14:58 1999
Return-Path: <rhh@ipass.net>
Received: from pluto.ipass.net (pluto.ipass.net [198.79.53.5])
	by hub.freebsd.org (Postfix) with ESMTP id C456614E46
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 15 Aug 1999 12:14:57 -0700 (PDT)
	(envelope-from rhh@ipass.net)
Received: from stealth.ipass.net. (ppp-1-191.dialup.rdu.ipass.net [209.170.132.191])
	by pluto.ipass.net (8.9.3/8.9.3) with ESMTP id PAA26294;
	Sun, 15 Aug 1999 15:15:10 -0400 (EDT)
Received: (from rhh@localhost)
	by stealth.ipass.net. (8.9.3/8.8.8) id PAA12679;
	Sun, 15 Aug 1999 15:16:26 -0400 (EDT)
	(envelope-from rhh)
Message-Id: <199908151916.PAA12679@stealth.ipass.net.>
Date: Sun, 15 Aug 1999 15:16:26 -0400 (EDT)
From: aa8vb@ipass.net
Sender: rhh@ipass.net
Reply-To: aa8vb@ipass.net
To: FreeBSD-gnats-submit@freebsd.org
Cc: aa8vb@ipass.net
Subject: mounting on top of a mounted file system
X-Send-Pr-Version: 3.2

>Number:         13161
>Category:       kern
>Synopsis:       mounting on top of a mounted file system
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    alfred
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 15 12:20:00 PDT 1999
>Closed-Date:    Sat Apr 13 04:27:31 PDT 2002
>Last-Modified:  Sat Apr 13 04:27:31 PDT 2002
>Originator:     Randall Hopper
>Release:        FreeBSD 3.2-RELEASE i386
>Organization:
self
>Environment:

	Stock 3.2-RELEASE.

>Description:

I had:

   > df | grep 32_share
   /dev/wd1s3e   2031953  1353017   516380    72%    /32_share

Then I mistakenly did a:

   > mount /dev/wd0s3e /32_share
                  ^

And it didn't generate an error (!?).  I then had:

   > df | grep 32_share
   /dev/wd1s3e   2031953  1353017   516380    72%    /32_share
   /dev/wd0s3e   2032623  1169007   701007    63%    /32_share

Odd things started happening (vi failed, missing directories, etc.), so I
rebooted.  All is normal now, and nothing lost AFAIK, but that sure was
strange.

This looks like a bug.

>How-To-Repeat:

   > mount /dev/wd1s1  /abc
   > mount /dev/wd1s2  /abc
 
   In this case, both were FreeBSD UFSs.

>Fix:
	
   Unknown.  I think that mount should issue an error when this is attempted.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->billf 
Responsible-Changed-By: billf 
Responsible-Changed-When: Sun Aug 15 13:32:16 PDT 1999 
Responsible-Changed-Why:  
I have a number of patches from Martin Blapp <blapp@attic.ch> 
one of which addresses this problem. 

From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To: <billf@FreeBSD.ORG>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: kern/13161: mounting on top of a mounted file system
Date: Sun, 15 Aug 1999 20:01:35 -0400 (EDT)

 <<On Sun, 15 Aug 1999 13:34:01 -0700 (PDT), <billf@FreeBSD.ORG> said:
 
 > I have a number of patches from Martin Blapp <blapp@attic.ch>
 > one of which addresses this problem.
 
 I disagree that it's a problem.  Unexpected to users of other
 operating systems, yes, but I'd still consider it a feature (and the
 behavior of those other systems a bug).  AIX has similar flexible
 mount semantics (in fact, more so -- AIX can mount files as well as
 directories).
 
 -GAWollman
 
 

From: Martin Blapp <mblapp@attic.ch>
To: freebsd-gnats-submit@freebsd.org, wollman@khavrinen.lcs.mit.edu
Cc:  
Subject: Re: kern/13161: mounting on top of a mounted file system
Date: Sun, 29 Aug 1999 18:05:27 +0200

 Solaris 7 does know the option '-O' to allow overlay mounts.
 
 I've patched mount and all mount_xxx to recognize and controll
 overlay mounts. With my fix, mounting on top will be still possible.
 It's the best for both sides, I think. We don't loose functionality,
 and it is more userfriendly.
 
 The other thing is, if we allow overlay mounts, umount should know
 to handle them properly. I've patched umount too, to always unmount
 overlay mounts in right order.
 
 Martin
 
 
Responsible-Changed-From-To: billf->alfred 
Responsible-Changed-By: billf 
Responsible-Changed-When: Sat Sep 4 16:53:04 PDT 1999 
Responsible-Changed-Why:  
Alfred has been working with Martin Blapp who has patches 
to address this. 
State-Changed-From-To: open->closed 
State-Changed-By: alfred 
State-Changed-When: Sat Apr 13 04:27:01 PDT 2002 
State-Changed-Why:  
Martin says that the "overlay" mount stuff fixes this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=13161 
>Unformatted:
