I've attached a modified version of Ted's spd_readdir.c that adds support for readdir_r and readdir64_r. It appears to be working (readdir64_r is the only new routine getting exercised), but should be taken as a rough cut. I also added a Makefile and a test program. It also looks as if this is giving me a huge speed improvement (at least x4) of my backups of my ext3 partitions. I'll try to report after a full and incremental backup complete, which will be a couple of days. Originally I tried taking the threading code from the system implementations of the original readdir_r. When that didn't work (since it was designed to be part of a libc build) I switched to pthreads. I don't know if recursive locking is essential; I activated it at one point while trying to get things to work. For big directories this code could use quite a lot of memory. It allows an optional max size, beyond which it reverts to the original system calls. I wonder if instead taking large directories in chunks would preserve much of the speedup while putting a bound on memory use. Ross Boylan
Attachment:
RBspd_dir.tgz
Description: application/compressed-tar
_______________________________________________ Ext3-users mailing list Ext3-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/ext3-users