#258 JFS failed to remove directories with 168+ files

bug
open
nobody
kernel (207)
5
2007-07-30
2007-07-30
Anonymous
No

----------
Kernel: Linux test 2.6.20-16-server #2 SMP Thu Jun 7 19:05:27 UTC 2007 x86_64 GNU/Linux
Ubuntu 7.04 amd64, Server
----------

Filesystemen

Shamelessly stolen from https://lists.linux-foundation.org/pipermail/bugme-new/2004-May/010408.html

The problem is that on JFS partition `rm -r' fails to delete a directory
containing more than 168 files.

The illustrating script:

=====
#!/bin/sh

mkdir test_dir
for i in `seq 1 169`;
do
echo "" >test_dir/$i
done
rm -r test_dir
=====

It produces the error
rm: cannot remove directory `test_dir': Directory not empty
leaving one file in the directory `test_dir'.
Subsequent run `rm -r test_dir' removes the directory as expected.

Discussion