fts: cache dirent_inode_sort_may_be_useful too
commit2649851d0409c3fafee7cf396d11c10892ac0e53
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 25 Jul 2017 06:44:05 +0000 (24 23:44 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 25 Jul 2017 07:27:47 +0000 (25 00:27 -0700)
treeb9245b84b307f4e778d9df945d6e7215441a3d7c
parentf7eb1b99e30517fc50c130cdecec24059a1b7c4f
fts: cache dirent_inode_sort_may_be_useful too

* lib/fts.c (struct dev_type): New struct.
(DEV_TYPE_HT_INITIAL_SIZE): New constant.
(dev_type_hash, dev_type_compare, filesystem_type): New functions.
(dirent_inode_sort_may_be_useful, leaf_optimization_applies):
Now takes FTSENT const *, not int.  All uses changed.  Use
filesystem_type to cache.
(link_count_optimize_ok): Remove.  Caller changed to use
leaf_optimization_applies, which now uses shared cache.
ChangeLog
lib/fts.c