Bug 16815

Summary: Cannot "rm -rf" for not-existed file on read-only nfs
Product: Base System Reporter: Jun Kuriyama <kuriyama>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Jun Kuriyama freebsd_committer freebsd_triage 2000-02-19 03:20:01 UTC
On nfs read-only mounted filesystem, you cannot "rm -rf" for not-existed file (or directory).
Kernel should not return EROFS at that case.

Fix: Sorry, this may be broken because copy/paste space/tab issue.
How-To-Repeat: % rm /usr/bin/a
rm: /usr/bin/a: No such file or directory
% rm -f /usr/bin/a
% rm -rf /usr/bin/a
% rm /usr/src/a
rm: /usr/src/a: No such file or directory
% rm -f /usr/src/a
% rm -rf /usr/src/a
rm: /usr/src/a: Read-only file system
%
Comment 1 Jun Kuriyama freebsd_committer freebsd_triage 2000-03-14 14:58:17 UTC
Responsible Changed
From-To: freebsd-bugs->dillon

Pass this PR to dillon. 
Comment 2 Giorgos Keramidas freebsd_committer freebsd_triage 2003-02-23 02:14:28 UTC
Responsible Changed
From-To: dillon->freebsd-bugs

Back to the free pool.
Comment 3 Aleksandr A Babaylov 2003-02-23 22:54:01 UTC
> Synopsis: Cannot "rm -rf" for not-existed file on read-only nfs
> 
> Responsible-Changed-From-To: dillon->freebsd-bugs
> Responsible-Changed-By: keramida
> Responsible-Changed-When: Sat Feb 22 18:14:28 PST 2003
> Responsible-Changed-Why: 
> Back to the free pool.
Look at bin/35842 with patch
Comment 4 Bruce Evans 2003-02-24 03:12:29 UTC
On Mon, 24 Feb 2003 .@babolo.ru wrote:

> > Synopsis: Cannot "rm -rf" for not-existed file on read-only nfs
> >
> > Responsible-Changed-From-To: dillon->freebsd-bugs
> > Responsible-Changed-By: keramida
> > Responsible-Changed-When: Sat Feb 22 18:14:28 PST 2003
> > Responsible-Changed-Why:
> > Back to the free pool.
> Look at bin/35842 with patch

Yes; this seems to be simpler than I first though.  rm -f works so there
is no problem in the kernel.

Bruce
Comment 5 Aleksandr A Babaylov 2003-02-24 16:28:31 UTC
> On Mon, 24 Feb 2003 .@babolo.ru wrote:
> 
> > > Synopsis: Cannot "rm -rf" for not-existed file on read-only nfs
> > >
> > > Responsible-Changed-From-To: dillon->freebsd-bugs
> > > Responsible-Changed-By: keramida
> > > Responsible-Changed-When: Sat Feb 22 18:14:28 PST 2003
> > > Responsible-Changed-Why:
> > > Back to the free pool.
> > Look at bin/35842 with patch
> Yes; this seems to be simpler than I first though.  rm -f works so there
> is no problem in the kernel.
I glad to see this.
Is there chance for patch to be commited?
Comment 6 Jun Kuriyama freebsd_committer freebsd_triage 2004-01-01 10:28:49 UTC
State Changed
From-To: open->closed

bin/35842 should fix this.