ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/bin/treescan
(Generate patch)

Comparing IO-AIO/bin/treescan (file contents):
Revision 1.5 by root, Sun Jan 9 05:10:28 2011 UTC vs.
Revision 1.8 by root, Tue Sep 27 12:12:55 2011 UTC

50 my ($dirs, $files) = @_; 50 my ($dirs, $files) = @_;
51 51
52 printfn "", [$path] unless $opt_nodirs; 52 printfn "", [$path] unless $opt_nodirs;
53 printfn $path, $files unless $opt_nofiles; 53 printfn $path, $files unless $opt_nofiles;
54 54
55 IO::AIO::poll_cb;
56
55 if ($opt_stat) { 57 if ($opt_stat) {
58 aio_wd $path, sub {
59 my $wd = shift;
60
56 aio_lstat "$path$_" for @$files; 61 aio_lstat [$wd, $_] for @$files;
62 };
57 } 63 }
58 64
59 &scan ("$path$_") for @$dirs; 65 &scan ("$path$_") for @$dirs;
60 }; 66 };
61} 67}
62 68
63IO::AIO::max_outstanding 64; 69IO::AIO::max_outstanding 400; # two fds per directory, so limit accordingly
64IO::AIO::min_parallel 32; 70IO::AIO::min_parallel 20;
65 71
66for my $seed (@ARGV) { 72for my $seed (@ARGV) {
67 $seed =~ s/\/+$//; 73 $seed =~ s/\/+$//;
68 aio_lstat "$seed/.", sub { 74 aio_lstat "$seed/.", sub {
69 if ($_[0]) { 75 if ($_[0]) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines