From owner-svn-src-all@FreeBSD.ORG Wed Mar 16 08:58:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A614106566B; Wed, 16 Mar 2011 08:58:09 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68F738FC0C; Wed, 16 Mar 2011 08:58:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2G8w9Gk075279; Wed, 16 Mar 2011 08:58:09 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2G8w9nR075276; Wed, 16 Mar 2011 08:58:09 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201103160858.p2G8w9nR075276@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 16 Mar 2011 08:58:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219696 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Mar 2011 08:58:09 -0000 Author: pjd Date: Wed Mar 16 08:58:09 2011 New Revision: 219696 URL: http://svn.freebsd.org/changeset/base/219696 Log: From fts.c comment: The "FTS_NOSTAT" option can avoid a lot of calls to stat(2) if it knows that a directory could not possibly have subdirectories. This is decided by looking at the link count: a subdirectory would increment its parent's link count by virtue of its own ".." entry. This assumption only holds for UFS-like filesystems that implement links and directories this way, so we must punt for others. It looks like ZFS is a UFS-like file system, as the above also holds for ZFS. Add ZFS to the list of file systems that allow for such optimization. MFC after: 1 month Modified: head/lib/libc/gen/fts-compat.c head/lib/libc/gen/fts.c Modified: head/lib/libc/gen/fts-compat.c ============================================================================== --- head/lib/libc/gen/fts-compat.c Wed Mar 16 08:56:22 2011 (r219695) +++ head/lib/libc/gen/fts-compat.c Wed Mar 16 08:58:09 2011 (r219696) @@ -110,6 +110,7 @@ struct _fts_private { static const char *ufslike_filesystems[] = { "ufs", + "zfs", "nfs", "nfs4", "ext2fs", Modified: head/lib/libc/gen/fts.c ============================================================================== --- head/lib/libc/gen/fts.c Wed Mar 16 08:56:22 2011 (r219695) +++ head/lib/libc/gen/fts.c Wed Mar 16 08:58:09 2011 (r219696) @@ -100,6 +100,7 @@ struct _fts_private { static const char *ufslike_filesystems[] = { "ufs", + "zfs", "nfs", "nfs4", "ext2fs",