Bug 26618

Summary: unmount(2) can't unmount a filesystem whose device has been lost
Product: Base System Reporter: fredette <fredette>
Component: kernAssignee: Edward Tomasz Napierala <trasz>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description fredette 2001-04-16 18:00:00 UTC
unmount(2) can't unmount a filesystem on a device that has been lost.
When the namei() call on the mountpoint fails with ENXIO, unmount
gives up and returns immediately.

Fix: 

When namei() returns ENXIO on the mountpoint, umount could walk
the list of mounted filesystems looking for the mountpoint itself.
I'll attach a patch to this PR that does this in a followup email.
How-To-Repeat: Mount a single filesystem read-only from a SCSI disk.  Power down
the disk, use 'camcontrol rescan' as appropriate to lose the device.
Now try to unmount the filesystem.
Comment 1 iedowse freebsd_committer freebsd_triage 2003-10-11 14:40:21 UTC
Responsible Changed
From-To: freebsd-bugs->iedowse


I'll take this one; it is possible that the read-only mount case 
has already been improved in -CURRENT, as unmount(8) no longer calls 
namei().
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2007-07-31 15:53:09 UTC
Responsible Changed
From-To: iedowse->freebsd-bugs

With permission, reassign from committer who is away from FreeBSD work for now.
Comment 3 Edward Tomasz Napierala freebsd_committer freebsd_triage 2009-07-08 13:33:53 UTC
Responsible Changed
From-To: freebsd-bugs->trasz

I'll take it.
Comment 4 Edward Tomasz Napierala freebsd_committer freebsd_triage 2009-07-08 13:34:00 UTC
State Changed
From-To: open->feedback

Can you still reproduce it with FreeBSD 7.2?  It should be fixed already.
Comment 5 Edward Tomasz Napierala freebsd_committer freebsd_triage 2009-07-08 15:52:49 UTC
State Changed
From-To: feedback->closed

Originator's mail bounces, and I believe the problem is fixed.