bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rm -r sometimes produces errors under NFS


From: Vincent Lefevre
Subject: Re: rm -r sometimes produces errors under NFS
Date: Tue, 6 Mar 2007 12:01:30 +0100
User-agent: Mutt/1.5.14-vl-r16324 (2007-03-03)

On 2007-03-06 09:03:46 +0100, Jim Meyering wrote:
> Would you please try changing this definition
> (from src/remove.c) to e.g., 200 or 2000,
> 
>     CONSECUTIVE_READDIR_UNLINK_THRESHOLD = 10
> 
> and see if it lets you use "rm -r ..." with no errors?

I've tried 2000, and no longer get the problem with this value.

> If this turns out to be a general problem, there's always
> the possibility of rewriting rm to use a different strategy:
> read all entries into malloc'd storage the first time, rather
> than reopening after processing each sub-directory.

This solution could be a problem with large directories, like
mailbox archives stored under the maildir format. Though machines
that need to read such directories probably have enough memory,
I think the memory used should be bounded.

Also, if when doing a "rm -r", some files are removed by another
mean at the same time, this shouldn't prevent rm from removing
everything.

-- 
Vincent Lefèvre <address@hidden> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]