>Number:         161439
>Category:       kern
>Synopsis:       umount -a -t <foo> doesn't work with nested filesystems
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 09 20:10:02 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Garrett Cooper
>Release:        10-CURRENT
>Organization:
n/a
>Environment:
FreeBSD fallout.local 10.0-CURRENT FreeBSD 10.0-CURRENT #1 r226046M: Wed Oct  5 
22:06:21 PDT 2011     [email protected]:/usr/obj/usr/src/sys/FALLOUT  amd64
>Description:
If one is trying to unmount just unionfs mounted directories, one cannot do it 
simply via 'umount -a -t unionfs' because it isn't popping filesystems off the 
stack and is instead dequeueing them based on the order allocated via 
getfsent(2). This isn't restricted to unionfs though, as shown in the 
reproduction case below.

So simply put, unmounting nested filesystems via umount -a -t <foo> doesn't 
work today.
>How-To-Repeat:
#!/bin/sh

for i in 0 1 2; do
        rm -f md.$i
        touch md.$i
        md=/dev/$(mdconfig -a -f md.$i -s 1g)
        fdisk -Iq $md
        mds="$mds $md"
done
t=tank
v=zvol
zpool create $t $mds
zfs create $t/ds
mount | grep "^$t"
umount -a -t zfs
>Fix:
>From a high-level:

1. All of the available filesystems need to be gathered and sorted by 
mountpoint.
2. The filesystems should be popped off the stack and unmounted.

>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to