[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU rm now works around Darwin 0.7.9 (MaxOS X 10.3.9) readdir bug
From: |
Jim Meyering |
Subject: |
Re: GNU rm now works around Darwin 0.7.9 (MaxOS X 10.3.9) readdir bug |
Date: |
Fri, 29 Sep 2006 17:06:16 +0200 |
Bruno Haible <address@hidden> wrote:
> Hi Jim,
>
> The Darwin HFS+ bug is even reproducible on Linux, on NFS mounts from a
> Darwin 10.3.9 machine. Here is that same directory, of which Darwin's
> readdir() bug occurred after 178 removals. Here it occurs already after
> 13 removals on average:
>
> $ ll charmaps | wc -l
> 195
> $ rm -r charmaps
> rm: cannot remove directory `charmaps': Directory not empty
...
> This means one has to enable the workaround with 8% speed penalty on all
> systems, not just Darwin...
Thanks for trying that.
I've been considering doing just that. Luckily, the 8% doesn't apply here,
since we needn't always do the rewind. It's necessary only when rm has
removed enough files in a directory to provoke the bug.
That 8% was performing the rewind even when there was only
one entry in a directory, and with the very worst case
directory "shape", and on the very worst case type of file system
(tmpfs), where I/O overhead is very low, so normally insignificant
factors like that one would appear.
With the current choice of 10 (assuming rm imposes the cost for everyone)
that means for non-buggy systems, rm would perform an unnecessary rewind
upon end of dirstream only when it has removed 10 or more files from a
given directory.
In fact, I am unable to measure any significant performance difference.
I created a hierarchy of 30000 directories, each containing 11 files
on a tmpfs file system:
n=30000
seq --format=a/%g $n|xargs mkdir -p
for i in $(seq $n); do seq --format=a/$i/%g 11;done|xargs touch
Then remove them all via "rm -rf a".
[The first has the work-around rewindir call, the second doesn't.]
$ /usr/bin/time /cu/src/rm -rf a
0.34user 3.45system 0:03.85elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+167minor)pagefaults 0swaps
$ /usr/bin/time /p/bin/rm -rf a
0.39user 3.37system 0:03.80elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+164minor)pagefaults 0swaps
- Re: coreutils-6.2: various runtime problems on Darwin-8.7.0 HFS+ (including attachment this time), (continued)
- Re: coreutils-6.2: various runtime problems on Darwin-8.7.0 HFS+ (including attachment this time), Jim Meyering, 2006/09/27
- Re: [bug-gnulib] Re: coreutils-6.2: various runtime problems on Darwin-8.7.0 HFS+ (including attachment this time), Bruno Haible, 2006/09/27
- Re: [bug-gnulib] Re: coreutils-6.2: various runtime problems on Darwin-8.7.0 HFS+ (including attachment this time), Bruno Haible, 2006/09/28
- Re: coreutils-6.2: various runtime problems on Darwin-8.7.0 HFS+ (including attachment this time), Jim Meyering, 2006/09/28
- Re: coreutils-6.2: bug with Darwin 7.9.0 HFS+ and NFS, Bruno Haible, 2006/09/29
- hard-links provoke EIO and EBADF errors in rm, Jim Meyering, 2006/09/29
- GNU rm now works around Darwin 0.7.9 (MaxOS X 10.3.9) readdir bug, Jim Meyering, 2006/09/29
- Re: GNU rm now works around Darwin 0.7.9 (MaxOS X 10.3.9) readdir bug, Bruno Haible, 2006/09/29
- Re: GNU rm now works around Darwin 0.7.9 (MaxOS X 10.3.9) readdir bug,
Jim Meyering <=
- Re: [bug-gnulib] Re: GNU rm now works around Darwin 0.7.9 (MaxOS X 10.3.9) readdir bug, Bruno Haible, 2006/09/29
- really fixed, this time [Re: GNU rm now works around Darwin 0.7.9 (MaxOS X 10.3.9) readdir bug, Jim Meyering, 2006/09/29
- Re: Darwin HFS+ bug, Bruno Haible, 2006/09/26
- Re: Darwin HFS+ bug, Jim Meyering, 2006/09/26
- Re: Darwin HFS+ bug, Paul Eggert, 2006/09/26
- Re: Darwin HFS+ bug, Jim Meyering, 2006/09/27
- Message not available
- Re: Darwin HFS+ bug, Paul Eggert, 2006/09/27
- Re: coreutils-6.2: various runtime problems on Darwin-8.7.0 HFS+ (including attachment this time), Jim Meyering, 2006/09/26
- Message not available
- Re: now getting a build error with coreutils-cvs (Re: coreutils-6.2: various runtime problems on Darwin-8.7.0 HFS+ (including attachment this time)), Jim Meyering, 2006/09/26
- Message not available
- Re: coreutils-cvs build error fixed (Re: now getting a build error with coreutils-cvs (Re: coreutils-6.2: various runtime problems on Darwin-8.7.0 HFS+ (including attachment this time))), Paul Eggert, 2006/09/27