From: Kamil Dudka Date: Wed, 9 Dec 2015 06:34:56 +0000 (+0100) Subject: fts: ensure leaf optimization is used for NFS X-Git-Tag: v1.0~6878 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=c97b8b9030de7c9a9f9f6d7dcdc3505c6b3f7f98;p=gnulib.git fts: ensure leaf optimization is used for NFS NFS provides usable dirent.d_type but not necessarily for all entries of large directories. See * lib/fts.c (leaf_optimization_applies): Append NFS on the white list. --- diff --git a/ChangeLog b/ChangeLog index 464dc7484b..4b0eb39b94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-12-20 Kamil Dudka + + fts: ensure leaf optimization is used for NFS + NFS provides usable dirent.d_type but not necessarily for all entries + of large directories. See + * lib/fts.c (leaf_optimization_applies): Append NFS on the white list. + 2015-12-20 Pádraig Brady fts: enable leaf optimization for XFS diff --git a/lib/fts.c b/lib/fts.c index 99679c7a96..c91d7a1acd 100644 --- a/lib/fts.c +++ b/lib/fts.c @@ -718,6 +718,11 @@ leaf_optimization_applies (int dir_fd) switch (fs_buf.f_type) { + case S_MAGIC_NFS: + /* NFS provides usable dirent.d_type but not necessarily for all entries + of large directories. See . */ + return true; + /* List here the file system types that lack usable dirent.d_type info, yet for which the optimization does apply. */ case S_MAGIC_REISERFS: