+2008-09-26 Jim Meyering <meyering@redhat.com>
+
+ fts: tweak inode comparison function
+ * lib/fts.c (fts_compare_ino): Sort on increasing, not decreasing
+ inode numbers, as documented.
+
+ fts: sort dirent entries on inode number before traversing
+ This avoids a quadratic, seek-related performance penalty when
+ operating on a directory containing many entries (measurable at 10k;
+ 3.5 hours at 2 million entries with a cold cache) on certain types
+ of file systems, including ext3 and ext4, but not tmpfs.
+ * lib/fts.c (DT_MUST_BE, NOT_AN_INODE_NUMBER, D_INO): Define.
+ (FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD): Define if not defined.
+ (S_MAGIC_TMPFS, S_MAGIC_NFS): Define.
+ (fs_handles_readdir_ordered_dirents_efficiently): New function.
+ (dirent_inode_sort_may_be_useful, fts_compare_ino): Likewise.
+ (fts_build): Set the stat.st_ino member from D_INO.
+ If it is likely to be useful, sort dirent entries on inode number.
+
+ * m4/fts.m4 (gl_FUNC_FTS_CORE): Check for fstatfs, sys/vfs.h,
+ and the struct statfs.f_type member.
+ * modules/fts (Depends-on): Add d-ino.
+
2008-09-26 Bruno Haible <bruno@clisp.org>
+ * modules/write: New file.
+ * lib/unistd.in.h: Include <sys/types.h>.
+ (write): New declaration.
+ * lib/write.c: New file.
+ * m4/write.m4: New file.
+ * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
+ GNULIB_UNISTD_H_SIGPIPE, GNULIB_WRITE, REPLACE_WRITE.
+ * modules/unistd (Makefile.am): Substitute GNULIB_UNISTD_H_SIGPIPE,
+ GNULIB_WRITE, REPLACE_WRITE.
+ * doc/posix-functions/write.texi: Mention the write, sigpipe modules
+ and the SIGPIPE issue.
+
+ * lib/signal.in.h (SIGPIPE): Define to a replacement value.
+ (raise): New declaration.
+ * lib/sigprocmask.c (SIGPIPE_handler): New variable.
+ (ext_signal): New function.
+ (rpl_raise): New function.
+ * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Initialize
+ GNULIB_SIGNAL_H_SIGPIPE.
+ * modules/signal (Makefile.am): Substitute GNULIB_SIGNAL_H_SIGPIPE.
+ * doc/posix-headers/signal.texi: Mention the SIGPIPE issue.
+
* modules/sigpipe: New file.
* m4/sigpipe.m4: New file.