Bug 85464

Summary: Cannot unmount file-backed disk imported from NFS or SMBFS
Product: Base System Reporter: Andrey Simonenko <simon>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.4-STABLE   
Hardware: Any   
OS: Any   

Description Andrey Simonenko 2005-08-30 09:40:16 UTC
Cannot unmount file-backed disk imported from NFS or SMBFS:

1.	Create file-backed disk on the server, put it on exported
	file system by NFS or SMBFS.

2.	On a client mount exported NFS or SMBFS file system.

3.	Run mdconfig to attach file-backed disk from mounted NFS or
	SMBFS file system and mount it (I worked with UFS file-backed
	disks).

4.	Then try to unmount file-backed disk.

The kernel shows following messages and refuses to unmount it:

For SMBFS:

Aug 30 10:04:27 comp1 kernel: fsync: giving up on dirty: 0xc149db58:
tag devfs, type VCHR, usecount 4, writecount 0, refcount 4, flags (VV_OBJBUF),
lock type devfs: EXCL (count 1) by thread 0xc111e780 (pid 555)
Aug 30 10:04:27 comp1 kernel: dev md0c

For NFS:

Aug 30 11:15:11 pm514-9 kernel: fsync: giving up on dirty: 0xc1a2f210:
tag devfs, type VCHR, usecount 3, writecount 0, refcount 4, flags (VV_OBJBUF),
lock type devfs: EXCL (count 1) by thread 0xc12d9480 (pid 492)
Aug 30 11:15:11 pm514-9 kernel: dev md0c
Comment 1 Garrett Cooper 2011-10-12 02:35:28 UTC
 	This is to be expected with any version of Unix when not mounting 
with -o soft if the underlying filesystem goes away. This isn't a bug but 
instead a well known caveat with network-based filesystems.
 	I suggest closing this bug with that in mind.
Thanks,
-Garrett
Comment 2 Andrey Simonenko 2011-10-12 12:06:57 UTC
On Tue, Oct 11, 2011 at 06:35:28PM -0700, Garrett Cooper wrote:
>  	This is to be expected with any version of Unix when not mounting 
> with -o soft if the underlying filesystem goes away. This isn't a bug but 
> instead a well known caveat with network-based filesystems.
>  	I suggest closing this bug with that in mind.

I described absolutely another bug on 5.4-STABLE.  It was impossible to
unmount file-backed disk (attached by 'mdconfig -a -t vnode -f ...') from
mounted NFS file system on a client system.

Since I could not reproduce this bug on 8.2-STABLE with new NFS client
and server, this PR can be closed.
Comment 3 Remko Lodder freebsd_committer freebsd_triage 2011-10-12 17:31:37 UTC
State Changed
From-To: open->closed

Submitter mentions this PR can be closed.