What happens with the indexed directory patch ?

Carles Xavier Munyoz Baldó
2002-09-05T15:59:09Z

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
I'm trying to install the htree indexed directory patch to my RedHat
kernel-source-2.4.18-10, but it seems that doesn't go.

First I tried the ext3 patch (I have sent some emails to this list telling the
problems I had with it).

Now I have just test the ext2 patch.
I get it from:
http://people.nl.linux.org/~phillips/htree/htree-2.4.18-2
and applied to my kernel source this way:
# cd /usr/src/linux
# cat htree-2.4.18-2 | patch -p1

All the compilation process goes well, I can reboot the computer with the new
kernel, make a new ext2 file system over a free partition and mount it with
the -o index option:
# mount /dev/hda7 /internet -o index
# mount
/dev/hda7 on /internet type ext2 (rw,index)

But when I make the test with the script I included at the end of this email,
the results are not the expected from an indexed directory. The creation time
of 2500 files for an (in theory) indexed directory, are nearly the same for
the non indexed directory:

INDEXED DIRECTORY:
# mkdir /internet/test
# cd /internet/test
# ./mk_file_test.sh 2500
Thu Sep  5 17:40:19 CEST 2002
real    0m15.532s
user    0m5.970s
sys     0m9.090s
Thu Sep  5 17:40:34 CEST 2002

NON INDEXED DIRECTORY:
# mkdir /root/test
# cd /root/test
# ./mk_file_test.sh 2500
Thu Sep  5 17:22:40 CEST 2002
real    0m15.130s
user    0m5.740s
sys     0m9.270s
Thu Sep  5 17:22:55 CEST 2002


The size of both directories after run the test script are:
drwxr-xr-x    2 root     root        49152 Sep  5 17:40 /internet/test
drwxr-xr-x    2 root     root        32768 Sep  5 17:44 /root/test

The (in theory) indexed directory is greater than the non indexed one. This is
normal, but why the nearly equal performance ? The creation time for the
indexed directory must be lot of times more quick.

Has anyone tested this patch succesfully ?
Is the patch still incomplete ?
Am I doing something wrong ?
May someone help me ?

Please, help me. I believe that the htree indexed directory is a very very
great improvement for the ext2/ext3 file system that must become a standard
as soon  as possible.

Greetings.
- ---
Carles Xavier Munyoz Baldó
carles@descom.es
Descom Consulting
Telf: +34 965861024
Fax: +34 965861024
http://www.descom.es/
- ---

[...]
if [ -z "$1" ]; then
  echo "USAGE $0 last_directory_number"
  exit 0
fi

N=0
date
time while [ 1 ]; do
  > $N
  if [ "$N" = "$1" ]; then
    break
  fi
  N=`expr $N + 1`
done
echo
date
[...]
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQA/AwUBPXd/UzvYAf7VZNaaEQJJXwCfY7RG80eFwuHX6LAygXnEQY4AOiEAn3qg
kXTwP7uwEAJG7buHHTXeSR+D
=ZqWs
-----END PGP SIGNATURE-----