[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fts: make find *much* faster on dirent.d_type-challenged FS
From: |
Jim Meyering |
Subject: |
Re: fts: make find *much* faster on dirent.d_type-challenged FS |
Date: |
Mon, 16 Feb 2009 15:50:48 +0100 |
Simon Josefsson <address@hidden> wrote:
> Jim Meyering <address@hidden> writes:
>
>> Jim Meyering <address@hidden> wrote:
>> ...
>>> Here's an incremental, then the adjusted full patch.
>>>
>>> BTW, I test this with coreutils by running chcon -R[*] on a directory
>>> containing 1000 files. With the patch, strace -c reports *1*
>>> calls to newfstatat, but without, it reports 1001 of them.
>>
>> Pushed.
>
> It seems to cause build failures in fts-lgpl:
>
> http://autobuild.josefsson.org/gnulib/log-200902160406471134000.txt
> http://autobuild.josefsson.org/gnulib/log-200902160342256147000.txt
Thanks, Simon.
With the following patch, running this:
/gnulib/gnulib-tool --create-testdir --with-tests --test fts-lgpl
succeeds once again.
>From 252aeae4ed5739425f5962a48e015e6f4ca22b35 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 16 Feb 2009 15:49:08 +0100
Subject: [PATCH] fts: add #if guards so that the fts_lgpl module still builds
* lib/fts.c: Guard just-added hash-table-using parts with
#if GNULIB_FTS, so as not to break builds of the fts_lgpl module.
Reported by Simon Josefsson.
---
lib/fts.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/fts.c b/lib/fts.c
index fdbe258..f00db41 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -618,8 +618,10 @@ fts_close (FTS *sp)
fd_ring_clear (&sp->fts_fd_ring);
+#if GNULIB_FTS
if (sp->fts_leaf_optimization_works_ht)
hash_free (sp->fts_leaf_optimization_works_ht);
+#endif
free_dir (sp);
@@ -717,6 +719,7 @@ static bool dirent_inode_sort_may_be_useful (int dir_fd) {
return true; }
static bool leaf_optimization_applies (int dir_fd) { return false; }
#endif
+#if GNULIB_FTS
/* link-count-optimization entry:
map an stat.st_dev number to a boolean: leaf_optimization_works */
struct LCO_ent
@@ -798,6 +801,7 @@ link_count_optimize_ok (FTSENT const *p)
return opt_ok;
}
+#endif
/*
* Special case of "/" at the end of the file name so that slashes aren't
--
1.6.2.rc0.264.g60787
- Re: fts: make find *much* faster on dirent.d_type-challenged FS, (continued)
- Re: fts: make find *much* faster on dirent.d_type-challenged FS, Karl Berry, 2009/02/13
- Re: fts: make find *much* faster on dirent.d_type-challenged FS, Eric Blake, 2009/02/13
- Re: fts: make find *much* faster on dirent.d_type-challenged FS, Matthew Woehlke, 2009/02/19
- Re: fts: make find *much* faster on dirent.d_type-challenged FS, Karl Berry, 2009/02/19
- Re: fts: make find *much* faster on dirent.d_type-challenged FS, Matthew Woehlke, 2009/02/19
- Re: fts: make find *much* faster on dirent.d_type-challenged FS, Tom G. Christensen, 2009/02/27
- Re: fts: make find *much* faster on dirent.d_type-challenged FS, Eric Blake, 2009/02/28
- Re: fts: make find *much* faster on dirent.d_type-challenged FS, Tom G. Christensen, 2009/02/28
- Re: fts: make find *much* faster on dirent.d_type-challenged FS, Jim Meyering, 2009/02/13
- Re: fts: make find *much* faster on dirent.d_type-challenged FS, Simon Josefsson, 2009/02/16
- Re: fts: make find *much* faster on dirent.d_type-challenged FS,
Jim Meyering <=
- Re: fts: make find *much* faster on dirent.d_type-challenged FS, Simon Josefsson, 2009/02/17