Subject: kern/1247: [dM] umount -f and unmount(2)'s MNT_FORCE flag don't work right
To: None <gnats-bugs@gnats.netbsd.org>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: netbsd-bugs
Date: 07/20/1995 10:54:41
>Number:         1247
>Category:       kern
>Synopsis:       [dM] umount -f and unmount(2)'s MNT_FORCE flag don't work right
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 20 11:05:02 1995
>Last-Modified:
>Originator:     der Mouse
>Organization:
	Dis-
>Release:        NetBSD/sparc -current as of a day or two ago
>Environment:
	SPARC IPC, but UTSLing makes me think it doesn't matter
>Description:
	umount(8)'s -f flag, and unmount(2)'s MNT_FORCE flag, can under
	some circumstances fail to unmount a filesystem.
>How-To-Repeat:
	# mount -r someserver:/some/file/system /mnt
	# ( cd /mnt ; sleep 999999 ) &
	[1] 1234
	# umount -f /mnt
	umount: /mnt: Device busy
	# kill %1
	
	[1]    Terminated           ( cd /mnt; sleep 999999 )
	# umount -f /mnt
	#
>Fix:
	Not known.  I do notice that kern/vfs_syscalls.c:dounmount()
	checks vfs_busy() before it checks for MNT_FORCE, which is
	probably the cause of the problem.  I don't know whether this
	is fixable; if not, maybe this should be treated as a doc-bug,
	and the documentation for umount(8) -f and unmount(2) MNT_FORCE
	updated to note that even when they're used the filesystem may
	not be unmounted.

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu
>Audit-Trail:
>Unformatted: